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),
})<{ isActive?: boolean }>(({ isActive }) => {
return { return {
flex: 1, flex: 1,
backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB', backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB',
borderWidth: '2px', borderWidth: '2px',
}; };
} });
);
const TAB_TITLE = { const TAB_TITLE = {
PAGES: 'pages', PAGES: 'pages',