From 7f19111e57ebc6845d8167db43e11767c554670c Mon Sep 17 00:00:00 2001 From: Baptiste Devessier Date: Mon, 9 Jun 2025 16:12:30 +0200 Subject: [PATCH] Stop forwarding the `active` prop for the `TabButton` component (#12501) This error was triggered: ![CleanShot 2025-06-09 at 14 49 45@2x](https://github.com/user-attachments/assets/9cc02f99-aead-40ec-aec1-33a6f8a4b81f) --- packages/twenty-ui/src/input/button/components/TabButton.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/twenty-ui/src/input/button/components/TabButton.tsx b/packages/twenty-ui/src/input/button/components/TabButton.tsx index 2ec21be78..ec9c8c1f3 100644 --- a/packages/twenty-ui/src/input/button/components/TabButton.tsx +++ b/packages/twenty-ui/src/input/button/components/TabButton.tsx @@ -1,3 +1,4 @@ +import isPropValid from '@emotion/is-prop-valid'; import styled from '@emotion/styled'; import { Pill } from '@ui/components/Pill/Pill'; import { Avatar, IconComponent } from '@ui/display'; @@ -5,7 +6,9 @@ import { ThemeContext } from '@ui/theme'; import { ReactElement, useContext } from 'react'; import { Link } from 'react-router-dom'; -const StyledTabButton = styled.button<{ +const StyledTabButton = styled('button', { + shouldForwardProp: (prop) => isPropValid(prop) && prop !== 'active', +})<{ active?: boolean; disabled?: boolean; to?: string;