Add skeleton color validasi and katalog

This commit is contained in:
2024-12-27 12:06:47 +08:00
parent d8f56309b0
commit b467aedece
17 changed files with 274 additions and 144 deletions

View File

@@ -0,0 +1,35 @@
import { Skeleton, SkeletonProps, createStyles } from '@mantine/core';
import { AccentColor } from '../_global/color';
interface CustomSkeletonProps extends SkeletonProps {
isLoading?: boolean;
className?: string;
}
const useStyles = createStyles((theme) => ({
skeleton: {
'&::before': {
backgroundColor: "#1F5B9E",
},
'&::after': {
backgroundColor: "#0F3055",
},
},
}));
const CustomSkeleton: React.FC<CustomSkeletonProps> = ({
isLoading = true,
className,
...props
}) => {
const { classes, cx } = useStyles();
return (
<Skeleton
className={cx(classes.skeleton, className)}
visible={isLoading}
{...props}
/>
);
};
export default CustomSkeleton;