File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/components/elements/buttons/button Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -115,20 +115,18 @@ const Button = forwardRef<HTMLElement, ButtonProps>(
115115 textTransform !== 'none' && textTransform
116116 )
117117
118- // Conditionally build props based on element type
119118 const isLinkElement = asValue === 'link' || asValue === 'a'
120119 const isButtonElement = asValue === 'button'
121-
120+
122121 const elementProps : Record < string , any > = {
123122 ref : ref as React . Ref < any > ,
124123 'aria-label' : ariaLabel ,
125124 onClick,
126125 className : buttonClassNames ,
127126 style,
128- ...rest
127+ ...rest ,
129128 }
130129
131- // Add link-specific props only for link elements
132130 if ( isLinkElement ) {
133131 elementProps . href = href
134132 if ( external ) {
@@ -142,7 +140,6 @@ const Button = forwardRef<HTMLElement, ButtonProps>(
142140 }
143141 }
144142
145- // Add button-specific props only for button elements
146143 if ( isButtonElement ) {
147144 elementProps . disabled = disabled
148145 if ( buttonType ) {
You can’t perform that action at this time.
0 commit comments