Files
twenty/node_modules
T
Sonarly Claude Code 48eda24c8c fix(twenty-ui): standardize disabled and loading states across button components
https://sonarly.com/issue/34231?type=bug

The eleven button components in twenty-ui implement disabled, loading, hover, and active states inconsistently, causing disabled buttons to appear clickable and loading states to be absent from most button types.

Fix: Fixed three button components in `twenty-ui` to properly suppress hover effects when disabled and use correct disabled state colors, matching the reference implementation in `Button.tsx`:

**MainButton.tsx** — The `secondary` variant's hover handler did not check the `disabled` prop, so disabled secondary buttons showed a hover background change (`background.tertiary`) making them appear interactive. Fixed by returning the variant's normal (non-hover) background when disabled — `background.secondary` for primary variant, `background.primary` for secondary variant — so the hover produces no visual change on disabled buttons. This affects auth/onboarding pages where MainButton is heavily used.

**InsideButton.tsx** — The hover handler unconditionally applied `background.transparent.light` regardless of disabled state. Fixed by adding a `disabled` prop check that returns `'transparent'` when disabled, matching the pattern used in LightButton, LightIconButton, FloatingButton, and FloatingIconButton.

**AnimatedButton.tsx** — Two fixes aligned with corresponding fixes already made to Button.tsx:
1. Primary/blue disabled background now uses `accent.accent4060` (a dimmed blue) instead of the full `color.blue`, matching Button.tsx's fix from commit `3e9bff22bb`.
2. Secondary/tertiary danger disabled color now uses `color.red5` (a dimmed red) instead of the full `font.color.danger`, matching Button.tsx's fix from commit `2ac93bd803`.
2026-05-04 20:42:53 +00:00

Symbolic link
1 line
40 B
Plaintext

/work/repos/twentyhq-twenty/node_modules