Components
Card Component
Components
- 3DCard Component
- AirpodsProLeft Component
- AirpodsProRight Component
- Alert Component
- Audio Component
- Button Component
- Card Component
- ChargingIconRight Component
- ChargingTextLeft Component
- Checkbox Component
- Collapse Component
- EmptyState Component
- ErrorMessage Component
- Form Component
- GridLayout Component
- HelpTooltip Component
- Image Component
- Input Component
- Lamp Component
- LightBox Component
- Modal Component
- MovingBorder Component
- PageLoading Component
- Popover Component
- PropertyDefault Component
- Radio Component
- RangeSlider Component
- Select
- SilentIconLeft Component
- SongThumbnail Component
- SilentTextRight Component
- Spinner Component
- TabButton Component
- TextArea Component
- Toggle Component
- Toggle2 Component
- Tooltip Component
- WarningMessage Component
Components
Card Component
Card
This component provides Card functionality.
Props
prop1
: Description of prop1.prop2
: Description of prop2.
Usage
import { Card } from './Card';
const props = {};
<Card prop1="value1" prop2="value2" />;
import type { ElementType, FC, MouseEvent, ReactNode } from 'react';
import cn from '../cn';
interface CardProps {
children: ReactNode;
as?: ElementType;
className?: string;
forceRounded?: boolean;
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
}
export const Card: FC<CardProps> = ({
children,
as: Tag = 'div',
className = '',
forceRounded = false,
onClick
}) => {
return (
<Tag
className={cn(
forceRounded ? 'rounded-xl' : 'rounded-xl sm:rounded-xl',
'rounded-xl border bg-white dark:border-gray-700 dark:bg-gray-900/90 ',
className
)}
onClick={onClick}
>
{children}
</Tag>
);
};