mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat: modify pivot style & add operation menu to pivot item (#1726)
This commit is contained in:
@@ -28,7 +28,8 @@ export const StyledArrow = styled(ArrowRightSmallIcon)({
|
||||
|
||||
export const StyledMenuItem = styled('button')<{
|
||||
isDir?: boolean;
|
||||
}>(({ theme, isDir = false }) => {
|
||||
disabled?: boolean;
|
||||
}>(({ theme, isDir = false, disabled = false }) => {
|
||||
return {
|
||||
width: '100%',
|
||||
borderRadius: '5px',
|
||||
@@ -39,10 +40,25 @@ export const StyledMenuItem = styled('button')<{
|
||||
cursor: isDir ? 'pointer' : '',
|
||||
position: 'relative',
|
||||
backgroundColor: 'transparent',
|
||||
color: theme.colors.textColor,
|
||||
':hover': {
|
||||
color: theme.colors.primaryColor,
|
||||
backgroundColor: theme.colors.hoverBackground,
|
||||
color: disabled ? theme.colors.disableColor : theme.colors.textColor,
|
||||
svg: {
|
||||
color: disabled ? theme.colors.disableColor : theme.colors.iconColor,
|
||||
},
|
||||
...(disabled
|
||||
? {
|
||||
cursor: 'not-allowed',
|
||||
pointerEvents: 'none',
|
||||
}
|
||||
: {}),
|
||||
|
||||
':hover': disabled
|
||||
? {}
|
||||
: {
|
||||
color: theme.colors.primaryColor,
|
||||
backgroundColor: theme.colors.hoverBackground,
|
||||
svg: {
|
||||
color: theme.colors.primaryColor,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user