(
(
{
type = 'divider',
symbol = 'cross',
symbols,
variant = 'gold',
size = 'md',
animated = false,
position = 'all',
className,
...props
},
ref
) => {
const baseClasses = `${styles.ornament} ${styles[variant]} ${styles[size]} ${animated ? styles.animated : ''}`;
const sym = getSymbol(symbol);
if (type === 'divider') {
return (
{sym}
);
}
if (type === 'fleuron') {
return (
{sym}
);
}
if (type === 'symbols') {
const syms = symbols || ['star', 'diamond', 'star'];
return (
{syms.map((s, i) => (
{getSymbol(s)}
))}
);
}
if (type === 'corner') {
const corners = position === 'all'
? ['TopLeft', 'TopRight', 'BottomLeft', 'BottomRight']
: [position.split('-').map((p, i) => i === 0 ? p.charAt(0).toUpperCase() + p.slice(1) : p.charAt(0).toUpperCase() + p.slice(1)).join('')];
return (
<>
{corners.map((pos) => (
{sym}
))}
>
);
}
if (type === 'frame') {
return (
);
}
return null;
}
);
Ornaments.displayName = 'Ornaments';
export default Ornaments;