fix: style

This commit is contained in:
yyh
2026-03-24 20:14:40 +08:00
parent 2e1888d37b
commit a3cd497dc0
4 changed files with 97 additions and 96 deletions

View File

@ -59,7 +59,10 @@ describe('MenuItem', () => {
renderMenuItem()
// Assert
expect(screen.getByRole('menuitem', { name: /rename/i })).toBeInTheDocument()
const item = screen.getByRole('menuitem', { name: /rename/i })
expect(item).toBeInTheDocument()
expect(item).toHaveClass('mx-1')
expect(item).toHaveClass('px-3')
})
it('should apply destructive variant styles when variant is destructive', () => {

View File

@ -87,7 +87,7 @@ const MenuItem = ({
onClick={onClick}
disabled={disabled}
destructive={variant === 'destructive'}
className={cn(menuItemVariants({ variant }), 'mx-0 h-auto w-full px-3 py-2')}
className={cn(menuItemVariants({ variant }), 'h-auto')}
>
{typeof Icon === 'string'
? <span className={cn(Icon, iconVariants({ variant }))} aria-hidden="true" />