import { clsx } from 'clsx'
export interface QuoteProps extends React.ComponentPropsWithoutRef<'blockquote'> {
variant?: 'default' | 'large' | 'small'
fontSize?: string
color?: string
fontFamily?: string
fontWeight?: string
fontStyle?: string
textAlign?: string
margin?: string
className?: string
}
export function Quote({
className = '',
variant = 'default',
fontSize = '',
color = '',
fontFamily = '',
fontWeight = '',
fontStyle = '',
textAlign = '',
margin = '',
children,
...props
}: QuoteProps) {
const variantClasses = {
default: 'text-xl/normal font-semibold',
large: 'text-2xl/normal font-semibold sm:text-2xl/normal',
small: 'text-lg/normal font-medium',
}
const finalFontSize = fontSize || variantClasses[variant]
const finalColor = color || 'text-contrast-light'
const finalFontFamily = fontFamily || 'font-heading'
const finalFontWeight = fontWeight || ''
const finalFontStyle = fontStyle || 'italic'
const finalTextAlign = textAlign || ''
const finalMargin = margin || 'mb-8'
return (
<blockquote
className={clsx(
finalFontSize,
finalColor,
finalFontFamily,
finalFontWeight,
finalFontStyle,
finalTextAlign,
finalMargin,
className
)}
{...props}
>
{children}
</blockquote>
)
}