mirror of
https://github.com/tabler/tabler.git
synced 2026-08-13 23:02:23 +04:00
37 lines
605 B
TypeScript
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>
|
|
);
|
|
}
|