-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsx
40 lines (36 loc) · 927 Bytes
/
index.jsx
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
import '@material/button/dist/mdc.button.css';
import classNames from 'classnames';
import React, { PropTypes } from 'react';
const Button = props =>
<button
className={classNames({
'mdc-button': true,
'mdc-button--dense': props.dense,
'mdc-button--raised': props.raised,
'mdc-button--compact': props.compact,
'mdc-button--primary': props.primary,
'mdc-button--accent': props.accent,
[props.className]: true,
})}
>
{props.children}
</button>
;
Button.propTypes = {
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
className: PropTypes.string,
dense: PropTypes.bool,
raised: PropTypes.bool,
compact: PropTypes.bool,
primary: PropTypes.bool,
accent: PropTypes.bool,
};
Button.defaultProps = {
className: '',
dense: false,
raised: false,
compact: false,
primary: false,
accent: false,
};
export default Button;