File tree Expand file tree Collapse file tree 4 files changed +265
-178
lines changed
showcase/src/components/showcase/wrapper Expand file tree Collapse file tree 4 files changed +265
-178
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,19 @@ export type ButtonProps = {
1414 iconBefore ?: React . ReactNode
1515 iconAfter ?: React . ReactNode
1616 isDisabled ?: boolean
17- onClick : ( ) => void
18- onDoubleClick ?: ( ) => void
19- onMouseDown ?: ( ) => void
20- onMouseUp ?: ( ) => void
2117 children ?: React . ReactNode
2218 style ?: CSSProperties
2319 className ?: string
24- }
20+ } & Pick <
21+ React . ButtonHTMLAttributes < HTMLButtonElement > ,
22+ | "type"
23+ | "onClick"
24+ | "onDoubleClick"
25+ | "onMouseDown"
26+ | "onMouseUp"
27+ | "title"
28+ | "aria-label"
29+ >
2530
2631export const Button = ( {
2732 label = "" ,
@@ -31,21 +36,14 @@ export const Button = ({
3136 iconAfter,
3237 isDisabled = false ,
3338 style,
34- onClick,
35- onDoubleClick,
36- onMouseDown,
37- onMouseUp,
3839 children,
3940 className,
41+ ...props
4042} : ButtonProps ) => {
4143 return (
4244 < button
4345 title = { title }
4446 aria-label = { label }
45- onClick = { onClick }
46- onDoubleClick = { onDoubleClick }
47- onMouseDown = { onMouseDown }
48- onMouseUp = { onMouseUp }
4947 style = { style }
5048 className = { twMerge (
5149 InteractiveStyles [ appearance ] ,
@@ -54,6 +52,7 @@ export const Button = ({
5452 className ,
5553 ) }
5654 disabled = { isDisabled }
55+ { ...props }
5756 >
5857 { iconBefore }
5958 { children }
You can’t perform that action at this time.
0 commit comments