mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-19 11:02:26 +03:00
fix: forward isActive prop in tab
This commit is contained in:
parent
a53a340d16
commit
9e9b8f78f0
@ -11,15 +11,15 @@ const StyledTabs = styled('div')({
|
||||
cursor: 'pointer',
|
||||
});
|
||||
|
||||
const StyledDivider = styled(Divider)<{ isActive?: boolean }>(
|
||||
({ isActive }) => {
|
||||
return {
|
||||
flex: 1,
|
||||
backgroundColor: isActive ? '#3E6FDB' : '#ECF1FB',
|
||||
borderWidth: '2px',
|
||||
};
|
||||
}
|
||||
);
|
||||
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',
|
||||
|
Loading…
Reference in New Issue
Block a user