forked from react-toolbox/react-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCard.js
More file actions
29 lines (25 loc) · 680 Bytes
/
Card.js
File metadata and controls
29 lines (25 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, { PropTypes } from 'react';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { CARD } from '../identifiers.js';
const Card = ({children, className, raised, theme, ...other}) => {
const classes = classnames(theme.card, {
[theme.raised]: raised
}, className);
return (
<div data-react-toolbox='card' className={classes} {...other}>
{children}
</div>
);
};
Card.propTypes = {
children: PropTypes.any,
className: PropTypes.string,
raised: PropTypes.bool,
theme: PropTypes.shape({
card: PropTypes.string,
raised: PropTypes.string
})
};
export default themr(CARD)(Card);
export { Card };