Complete text component

This commit is contained in:
Hazem Krimi
2021-04-13 22:24:38 +01:00
parent ed29c607ac
commit b784a10042
3 changed files with 154 additions and 5 deletions
+23 -2
View File
@@ -1,7 +1,28 @@
import { Wrapper } from './styles';
const Text = () => {
return <Wrapper></Wrapper>;
type TextProps = {
children?: React.ReactNode | JSX.Element | string;
className?: string;
variant?: 'display' | 'headline' | 'title' | 'subheader' | 'body' | 'caption';
color?: 'client' | 'productOwner' | 'developer' | 'admin' | 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;