mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 02:21:49 +03:00
fix: warning on bypass visible value in switch button (#1607)
This commit is contained in:
parent
74fc43020a
commit
37a135d49e
@ -1,10 +1,12 @@
|
||||
import { IconButton, styled } from '@affine/component';
|
||||
|
||||
export const StyledSidebarSwitch = styled(IconButton)<{ visible: boolean }>(
|
||||
({ visible }) => {
|
||||
return {
|
||||
opacity: visible ? 1 : 0,
|
||||
transition: 'all 0.2s ease-in-out',
|
||||
};
|
||||
}
|
||||
);
|
||||
export const StyledSidebarSwitch = styled(IconButton, {
|
||||
shouldForwardProp(propName: PropertyKey) {
|
||||
return propName !== 'visible';
|
||||
},
|
||||
})<{ visible: boolean }>(({ visible }) => {
|
||||
return {
|
||||
opacity: visible ? 1 : 0,
|
||||
transition: 'all 0.2s ease-in-out',
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user