Button update

This commit is contained in:
tmshv committed 2022-09-06 16:23:42 +03:00
1 parent 8ba8b0d05b
commit 585d3ae75c
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -32,10 +32,10 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", theme = "defau
[s.disabled]: disabled,
})
const onClick = useCallback<MouseEventHandler<HTMLButtonElement>>(event => {
if (props.onClick) {
if (typeof props.onClick === "function") {
props.onClick(props.value, event)
}
}, [props.value, props.onClick])
}, [props])
if (props.href) {
return (
+3 -1
View File
@@ -1,5 +1,7 @@
.button {
display: block;
display: inline-flex;
align-items: center;
font-size: var(--font-size-default);
text-align: center;