mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(core): add favorite folder in menu, adjust empty-page new page button (#7730)
close AF-1150, AF-1128, AF-1131 - Replace favorite migration related copy - Adjust empty page's "New Page" button  - Add toggle favorite to folder menu  - Adjust `Button` - add `withoutHover` state - remove cursor: not-allowed when disabled
This commit is contained in:
@@ -79,6 +79,10 @@ export const button = style({
|
||||
lineHeight: lineHeightVar,
|
||||
|
||||
selectors: {
|
||||
// hover layer
|
||||
'&[data-no-hover]:before, &[data-disabled]:before': {
|
||||
display: 'none',
|
||||
},
|
||||
'&:hover:before': { opacity: 1 },
|
||||
'&[data-block]': { display: 'flex' },
|
||||
|
||||
@@ -162,7 +166,6 @@ export const button = style({
|
||||
|
||||
// disabled
|
||||
'&[data-disabled]': {
|
||||
cursor: 'not-allowed',
|
||||
opacity: 0.5,
|
||||
},
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ export interface ButtonProps
|
||||
*/
|
||||
loading?: boolean;
|
||||
|
||||
/** No hover state */
|
||||
withoutHover?: boolean;
|
||||
|
||||
/**
|
||||
* By default, it is considered as an icon with preset size and color,
|
||||
* can be overridden by `prefixClassName` and `prefixStyle`.
|
||||
@@ -103,6 +106,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
block,
|
||||
loading,
|
||||
className,
|
||||
withoutHover,
|
||||
|
||||
prefix,
|
||||
prefixClassName,
|
||||
@@ -142,6 +146,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
data-disabled={disabled || undefined}
|
||||
data-size={size}
|
||||
data-variant={variant}
|
||||
data-no-hover={withoutHover || undefined}
|
||||
onClick={handleClick}
|
||||
>
|
||||
<IconSlot
|
||||
|
||||
Reference in New Issue
Block a user