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',
});
const StyledDivider = styled(Divider)<{ isActive?: boolean }>(
({ isActive }) => {
const StyledDivider = styled(Divider, {
shouldForwardProp: (prop: string) => !['isActive'].includes(prop),
})<{ isActive?: boolean }>(({ isActive }) => {
return {
flex: 1,
backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB',
borderWidth: '2px',
};
}
);
});
const TAB_TITLE = {
PAGES: 'pages',