mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
fix: prevent non-boolean 'active' prop from being forwarded to DOM (#8534)
Fixes: #8533
This commit is contained in:
parent
badebc513f
commit
9134ed8ce4
@ -1,3 +1,4 @@
|
||||
import isPropValid from '@emotion/is-prop-valid';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { ReactElement } from 'react';
|
||||
@ -16,11 +17,9 @@ type TabProps = {
|
||||
to?: string;
|
||||
};
|
||||
|
||||
const StyledTab = styled.button<{
|
||||
active?: boolean;
|
||||
disabled?: boolean;
|
||||
to?: string;
|
||||
}>`
|
||||
const StyledTab = styled('button', {
|
||||
shouldForwardProp: (prop) => isPropValid(prop) && prop !== 'active',
|
||||
})<{ active?: boolean; disabled?: boolean; to?: string }>`
|
||||
align-items: center;
|
||||
border-bottom: 1px solid ${({ theme }) => theme.border.color.light};
|
||||
border-color: ${({ theme, active }) =>
|
||||
|
Loading…
Reference in New Issue
Block a user