-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
52 lines (46 loc) · 1.03 KB
/
index.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import ActionButtons from './ActionButtons';
import ActionIcons from './ActionIcons';
import Actions from './Actions';
import PrimaryContent from './PrimaryContent';
import Media from './Media';
export default class Card extends React.Component {
render() {
const {
className,
children,
outlined,
...otherProps
} = this.props;
const classes = classnames('mdc-card', className, {
'mdc-card--outlined': outlined,
});
return (
<div
className={classes}
{...otherProps}
>
{children}
</div>
);
}
}
Card.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
outlined: PropTypes.bool,
};
Card.defaultProps = {
children: null,
className: '',
outlined: false,
};
export {
ActionButtons as CardActionButtons,
ActionIcons as CardActionIcons,
Actions as CardActions,
PrimaryContent as CardPrimaryContent,
Media as CardMedia,
};