diff --git a/src/shared/components/Button/index.jsx b/src/shared/components/Button/index.jsx new file mode 100644 index 00000000..a412fb92 --- /dev/null +++ b/src/shared/components/Button/index.jsx @@ -0,0 +1,123 @@ +/** + * The Button component provide a standard button / button-like link: + * - When disabled, it renders as
; + * - When no "to" prop is passed in, it renders as + /* eslint-enable react/button-has-type */ + ); +} + +Button.defaultProps = { + active: false, + children: null, + disabled: false, + enforceA: false, + onClick: null, + onMouseDown: null, + openNewTab: false, + replace: false, + size: null, + theme: defaultTheme, + to: null, + type: 'button', + style: {}, +}; + +Button.propTypes = { + active: PT.bool, + children: PT.node, + disabled: PT.bool, + enforceA: PT.bool, + onClick: PT.func, + onMouseDown: PT.func, + openNewTab: PT.bool, + replace: PT.bool, + size: PT.string, + theme: PT.shape({ + button: PT.string.isRequired, + disabled: PT.string, + link: PT.string, + regular: PT.string, + }), + to: PT.oneOfType([PT.object, PT.string]), + type: PT.oneOf(['button', 'reset', 'submit']), + style: PT.shape(), +};