aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
45 lines (42 loc) • 1.06 kB
JavaScript
'use client';
import React from 'react';
import { cn } from '../../lib/utilsComprehensive.js';
const variantMap = {
h1: 'h1',
h2: 'h2',
h3: 'h3',
h4: 'h4',
h5: 'h5',
h6: 'h6',
p: 'p',
span: 'span',
div: 'div'
};
const Typography = /*#__PURE__*/React.forwardRef(({
variant = 'p',
className,
children,
...props
}, ref) => {
// TODO: Integrate ContrastGuard for table cells, list items, badges, card titles, and other text content for WCAG AA compliance
const Component = variantMap[variant];
const sizeClass = {
h1: 'glass-text-5xl',
h2: 'glass-text-4xl',
h3: 'glass-text-3xl',
h4: 'glass-text-xl',
h5: 'glass-text-lg',
h6: 'glass-text-base',
p: 'glass-text-base',
span: 'glass-text-base',
div: 'glass-text-base'
};
return /*#__PURE__*/React.createElement(Component, {
className: cn('glass-text-primary', sizeClass[variant], className),
ref,
...props
}, children);
});
Typography.displayName = 'Typography';
export { Typography };
//# sourceMappingURL=Typography.js.map