diff --git a/src/atoms/Button.js b/src/atoms/Button.js new file mode 100644 index 0000000000000000000000000000000000000000..052c070638685f2c5acb38db731fb6973034bbb5 --- /dev/null +++ b/src/atoms/Button.js @@ -0,0 +1,9 @@ +import React from 'react' + +const Button = ({ children, type = 'button', disabled}) => ( + <button + type={type} + disabled={disabled}>{children}</button> +) + +export default Button diff --git a/src/atoms/Button.md b/src/atoms/Button.md new file mode 100644 index 0000000000000000000000000000000000000000..1c2b0519b6d10c7cadced5db147399958467e7cf --- /dev/null +++ b/src/atoms/Button.md @@ -0,0 +1,11 @@ +A button. + +```js +<Button>Save</Button> +``` + +A button can be disabled. + +```js +<Button disabled>Save</Button> +``` diff --git a/src/index.js b/src/index.js index ecc47f5bdef5d5f5d5f2e16f29cd83def821d1f7..2ee87384c61188f3b65d4d1eec76a7bca4eb8fca 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,6 @@ +export { default as Button } from './atoms/Button' export { default as Checkbox } from './atoms/Checkbox' +export { default as Icon } from './atoms/Icon' export { default as Menu } from './atoms/Menu' export { default as Radio } from './atoms/Radio' export { default as Tags } from './atoms/Tags'