Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

693 B
Raw Blame
import classes from './Card.module.scss';
import React, {CSSProperties, LegacyRef} from "react";

export type CardVariant = 'default' | 'lightGray' | 'lightGradient';

interface CardInterface {
    children: React.ReactNode;
    className?: string;
    style?: CSSProperties | undefined;
    variant?: CardVariant;
    ref?: LegacyRef<HTMLDivElement> | undefined;
}

export const Card = ({children, className = '', style = {}, variant = 'default', ref = null}: CardInterface) => {
    return (
        <div className={`card ${variant} ${className} ${classes.card} ${classes[variant]}`}
             style={style}
             ref={ref}
        >
            {children}
        </div>
    );
}