🐛 Fix colors of card wrapper when category

This commit is contained in:
Manuel Ruwe
2022-12-30 17:04:56 +01:00
parent 42a16e0015
commit c8d35f4aad
3 changed files with 29 additions and 14 deletions

View File

@@ -5,18 +5,20 @@ import { useEditModeStore } from '../Views/useEditModeStore';
interface HomarrCardWrapperProps extends CardProps {
children: ReactNode;
isCategory?: boolean;
}
export const HomarrCardWrapper = ({ ...props }: HomarrCardWrapperProps) => {
const { isCategory = false, ...restProps } = props;
const {
cx,
classes: { card: cardClass },
} = useCardStyles();
} = useCardStyles(isCategory);
const isEditMode = useEditModeStore((x) => x.enabled);
return (
<Card
{...props}
className={cx(props.className, cardClass)}
{...restProps}
className={cx(restProps.className, cardClass)}
withBorder
style={{ cursor: isEditMode ? 'move' : 'default' }}
radius="lg"