mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
38 lines
776 B
TypeScript
38 lines
776 B
TypeScript
import { Wrapper } from './styles';
|
|
|
|
export type TextProps = {
|
|
children?: string;
|
|
className?: string;
|
|
variant?: 'display' | 'headline' | 'title' | 'subheader' | 'body' | 'caption';
|
|
color?:
|
|
| 'primary'
|
|
| 'secondary'
|
|
| 'tertiary'
|
|
| 'success'
|
|
| 'warning'
|
|
| 'error'
|
|
| 'black'
|
|
| 'white'
|
|
| string;
|
|
align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
|
|
display?: 'initial' | 'block' | 'inline';
|
|
gutterBottom?: boolean;
|
|
lineThrough?: boolean;
|
|
weight?: 'initial' | 'normal' | 'bold' | number;
|
|
};
|
|
|
|
const Text = ({
|
|
children,
|
|
variant = 'body',
|
|
className,
|
|
...props
|
|
}: TextProps) => {
|
|
return (
|
|
<Wrapper className={`${variant} ${className}`} {...props}>
|
|
{children}
|
|
</Wrapper>
|
|
);
|
|
};
|
|
|
|
export default Text;
|