first
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import type { CSSProperties, ComponentPropsWithoutRef } from 'react';
|
||||
import { cn } from 'helpers/cn';
|
||||
|
||||
export const cardStyle = (overrides?: CSSProperties): CSSProperties => ({
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.9)',
|
||||
backgroundImage: `
|
||||
linear-gradient(to right, rgba(20, 83, 45, 0.08) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(20, 83, 45, 0.08) 1px, transparent 1px)
|
||||
`,
|
||||
backgroundSize: '20px 20px',
|
||||
...overrides,
|
||||
});
|
||||
|
||||
type CardProps = ComponentPropsWithoutRef<'div'>;
|
||||
|
||||
export const Card = ({ className, style, ...props }: CardProps) => {
|
||||
return (
|
||||
<div
|
||||
className={cn('rounded-xl border-2 border-duck-dark/30 shadow-lg', className)}
|
||||
style={cardStyle(style)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user