1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-13 23:02:23 +04:00
Files
tabler/site/components/Shape.tsx
T
2023-07-18 00:13:56 +02:00

37 lines
605 B
TypeScript

import clsx from 'clsx';
import Icon from '@/components/Icon';
export default function Shape({
icon,
placeholder,
color,
size,
rounded,
className,
}: {
icon?: string
placeholder?: string | number
color?: string
size?: string
rounded?: boolean
className?: string
}) {
return (
<div
className={clsx(
'shape',
{
[`shape-${color}`]: color,
[`shape-${size}`]: size,
'shape-rounded': rounded,
},
className
)}
>
{icon && <Icon name={icon} />}
{placeholder && placeholder}
</div>
);
}