react-vite-themes
Version:
A test/experimental React theme system created for learning purposes. Features atomic design components, SCSS variables, and dark/light theme support. Not intended for production use.
8 lines (7 loc) • 494 B
JavaScript
import React from 'react';
import { cn } from '../../../utils';
import './Typography.scss';
export const Typography = ({ variant = 'p', size = 'md', weight = 'normal', color = 'inherit', align = 'left', className, children, ...props }) => {
const typographyClasses = cn('typography', `typography--${size}`, `typography--${weight}`, `typography--${color}`, `typography--${align}`, className);
return React.createElement(variant, { className: typographyClasses, ...props }, children);
};