File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ describe('Button component', () => {
64
64
} ) ;
65
65
66
66
it ( 'applies the correct rounded class based on the "rounded" prop' , ( ) => {
67
- const { container } = render ( < Button rounded = "lg " > Test Button</ Button > ) ;
68
- expect ( container . firstChild ) . toHaveClass ( 'deriv-button__rounded--lg ' ) ;
67
+ const { container } = render ( < Button rounded = "md " > Test Button</ Button > ) ;
68
+ expect ( container . firstChild ) . toHaveClass ( 'deriv-button__rounded--md ' ) ;
69
69
} ) ;
70
70
71
71
it ( 'shows the icon when provided and not loading' , ( ) => {
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export const Button = ({
84
84
className ,
85
85
) }
86
86
disabled = { rest . disabled || isLoading }
87
- aria-label = { rest . children }
87
+ aria-label = { rest . children && typeof rest . children === 'string' ? rest . children : '' }
88
88
{ ...rest }
89
89
>
90
90
{ isLoading && (
You can’t perform that action at this time.
0 commit comments