mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
14 lines
383 B
TypeScript
14 lines
383 B
TypeScript
import { IconButton, styled } from '@affine/component';
|
|
|
|
export const StyledSidebarSwitch = styled(IconButton, {
|
|
shouldForwardProp(propName: PropertyKey) {
|
|
return propName !== 'visible';
|
|
},
|
|
})<{ visible: boolean }>(({ visible }) => {
|
|
return {
|
|
opacity: visible ? 1 : 0,
|
|
WebkitAppRegion: visible ? 'no-drag' : 'drag',
|
|
transition: 'all 0.2s ease-in-out',
|
|
};
|
|
});
|