mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
fix: style
This commit is contained in:
@ -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', () => {
|
||||
|
||||
@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user