feat: new import page component (#3277)

This commit is contained in:
Whitewater
2023-07-18 13:36:14 +08:00
committed by GitHub
parent 41edacfc81
commit bf41b25988
6 changed files with 173 additions and 4 deletions
@@ -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
},
});