Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace isSmall prop with size in NavigationMenuSelector #59667

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -131,7 +131,7 @@ function NavigationMenuSelector( {
<DropdownMenu
label={ selectorLabel }
icon={ moreVertical }
toggleProps={ { isSmall: true } }
toggleProps={ { size: 'small' } }
>
{ ( { onClose } ) => (
<>
Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/button/test/index.tsx
Expand Up @@ -593,6 +593,11 @@ describe( 'Button', () => {
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
} );

it( 'should have the is-small class when small class prop is passed', () => {
render( <Button size="small" /> );
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
} );

it( 'should prioritize the `size` prop over `isSmall`', () => {
render( <Button size="compact" isSmall /> );
expect( screen.getByRole( 'button' ) ).not.toHaveClass(
Expand Down