fix: forward isActive prop in tab

This commit is contained in:
Federico Leiva 2022-08-06 01:43:43 -03:00
parent a53a340d16
commit 9e9b8f78f0

View File

@ -11,15 +11,15 @@ const StyledTabs = styled('div')({
cursor: 'pointer', cursor: 'pointer',
}); });
const StyledDivider = styled(Divider)<{ isActive?: boolean }>( const StyledDivider = styled(Divider, {
({ isActive }) => { shouldForwardProp: (prop: string) => !['isActive'].includes(prop),
return { })<{ isActive?: boolean }>(({ isActive }) => {
flex: 1, return {
backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB', flex: 1,
borderWidth: '2px', backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB',
}; borderWidth: '2px',
} };
); });
const TAB_TITLE = { const TAB_TITLE = {
PAGES: 'pages', PAGES: 'pages',