import React from 'react'; import { useStyles } from '../../core/hooks/useStyles'; import { useTheme } from '../../core/theme/ThemeProvider'; import { Stack } from '../Stack/Stack'; import { Text } from '../Text/Text'; interface SofaProps extends React.HTMLAttributes { children: React.ReactNode; title?: string; description?: string; } export const Sofa: React.FC = ({ children, className = '', title, description, ...props }) => { const { theme } = useTheme(); const createStyle = useStyles('sofa'); const sofaClass = createStyle({ padding: '24px', backgroundColor: theme.colors.backgroundSecondary, borderRadius: '8px', border: `1px solid ${theme.colors.border}`, transition: 'background-color 0.3s, border-color 0.3s', '@supports (backdrop-filter: none) or (-webkit-backdrop-filter: none)': { backdropFilter: 'blur(16px)', }, }); return (
{(title || description) ? ( {title && {title}} {description && {description}}
{children}
) : ( children )}
); };