fix: reduce Button sm padding on mobile
This commit is contained in:
@@ -38,7 +38,7 @@ describe('Button', () => {
|
||||
});
|
||||
it('applies sm size', () => {
|
||||
render(<Button size="sm">Go</Button>);
|
||||
expect(screen.getByRole('button')).toHaveClass('px-4', 'py-2');
|
||||
expect(screen.getByRole('button')).toHaveClass('px-3', 'py-1.5', 'sm:px-4', 'sm:py-2');
|
||||
});
|
||||
it('applies lg size', () => {
|
||||
render(<Button size="lg">Go</Button>);
|
||||
@@ -87,7 +87,7 @@ describe('Button', () => {
|
||||
</Button>,
|
||||
);
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveClass('bg-blue', 'px-4', 'py-2');
|
||||
expect(link).toHaveClass('bg-blue', 'px-3', 'py-1.5', 'sm:px-4', 'sm:py-2');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ const VARIANTS = {
|
||||
} as const satisfies Record<ButtonVariant, string>;
|
||||
|
||||
const SIZES = {
|
||||
sm: 'px-4 py-2 text-sm',
|
||||
sm: 'px-3 py-1.5 sm:px-4 sm:py-2 text-sm',
|
||||
md: 'px-6 py-3 text-base',
|
||||
lg: 'px-8 py-4 text-lg',
|
||||
} as const satisfies Record<ButtonSize, string>;
|
||||
|
||||
Reference in New Issue
Block a user