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