mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
feat(core): guard service (#9816)
This commit is contained in:
@@ -51,7 +51,7 @@ export const menuItem = style({
|
||||
'&.block': {
|
||||
maxWidth: '100%',
|
||||
},
|
||||
'&[data-disabled]': {
|
||||
'&[data-disabled], &.disabled': {
|
||||
vars: {
|
||||
[iconColor]: cssVarV2('icon/disable'),
|
||||
[labelColor]: cssVarV2('text/secondary'),
|
||||
|
||||
@@ -16,13 +16,15 @@ export const useMenuItem = <T extends MenuItemProps>({
|
||||
checked,
|
||||
selected,
|
||||
block,
|
||||
disabled,
|
||||
...otherProps
|
||||
}: T) => {
|
||||
const className = clsx(
|
||||
styles.menuItem,
|
||||
{
|
||||
danger: type === 'danger',
|
||||
warning: type === 'warning',
|
||||
danger: disabled ? false : type === 'danger',
|
||||
warning: disabled ? false : type === 'warning',
|
||||
disabled,
|
||||
checked,
|
||||
selected,
|
||||
block,
|
||||
|
||||
Reference in New Issue
Block a user