Files
AFFiNE/libs/components/ui/src/clickable/Clickable.tsx
2022-07-22 15:49:21 +08:00

22 lines
535 B
TypeScript

import { styled } from '../styled';
interface ClickableProps {
active?: boolean;
}
export const Clickable = styled('div')<ClickableProps>(({ theme, active }) => {
return {
...theme.affine.typography.sm,
backgroundColor: active
? theme.affine.palette.hover
: theme.affine.palette.white,
cursor: 'pointer',
color: theme.affine.palette.menu,
borderRadius: '5px',
'&:hover': {
backgroundColor: theme.affine.palette.hover,
},
};
});