mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
feat: new import page component (#3277)
This commit is contained in:
@@ -9,10 +9,18 @@ export const BlockCard = forwardRef<
|
||||
title: string;
|
||||
desc?: string;
|
||||
right?: ReactNode;
|
||||
disabled?: boolean;
|
||||
} & HTMLAttributes<HTMLDivElement>
|
||||
>(({ left, title, desc, right, ...props }, ref) => {
|
||||
>(({ left, title, desc, right, disabled, onClick, ...props }, ref) => {
|
||||
return (
|
||||
<div ref={ref} className={styles.blockCard} {...props}>
|
||||
<div
|
||||
ref={ref}
|
||||
className={styles.blockCard}
|
||||
role="button"
|
||||
aria-disabled={disabled}
|
||||
onClick={disabled ? undefined : onClick}
|
||||
{...props}
|
||||
>
|
||||
{left && <div className={styles.blockCardAround}>{left}</div>}
|
||||
<div className={styles.blockCardContent}>
|
||||
<div>{title}</div>
|
||||
|
||||
@@ -14,6 +14,13 @@ export const blockCard = style({
|
||||
'&:hover': {
|
||||
boxShadow: 'var(--affine-shadow-1)',
|
||||
},
|
||||
'&[aria-disabled]': {
|
||||
color: 'var(--affine-text-disable-color)',
|
||||
},
|
||||
'&[aria-disabled]:hover': {
|
||||
cursor: 'not-allowed',
|
||||
boxShadow: 'none',
|
||||
},
|
||||
// TODO active styles
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user