19 lines
628 B
TypeScript
19 lines
628 B
TypeScript
import { cn } from './utils';
|
|
import type { VariantProps } from 'class-variance-authority';
|
|
import { cva } from 'class-variance-authority';
|
|
import { forwardRef, type HTMLAttributes } from 'react';
|
|
|
|
const variants = cva(
|
|
'grid w-full gap-2 rounded-sm border border-slate-100 bg-white p-5 lg:w-standard'
|
|
);
|
|
|
|
export type BackgroundProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof variants>;
|
|
|
|
export const Background = forwardRef<HTMLDivElement, BackgroundProps>(
|
|
({ children, className, ...props }, ref) => (
|
|
<div className={cn(variants({ className }))} ref={ref} {...props}>
|
|
{children}
|
|
</div>
|
|
)
|
|
);
|