diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 18c13565..6f58bb0a 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -32,10 +32,10 @@ export const Button: React.FC = ({ size = "default", theme = "defau [s.disabled]: disabled, }) const onClick = useCallback>(event => { - if (props.onClick) { + if (typeof props.onClick === "function") { props.onClick(props.value, event) } - }, [props.value, props.onClick]) + }, [props]) if (props.href) { return ( diff --git a/src/components/Button/styles.module.css b/src/components/Button/styles.module.css index 96b64d31..04a37c84 100644 --- a/src/components/Button/styles.module.css +++ b/src/components/Button/styles.module.css @@ -1,5 +1,7 @@ .button { - display: block; + display: inline-flex; + align-items: center; + font-size: var(--font-size-default); text-align: center;