first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import styled from 'styled-components';
import { getStyle } from 'e-utils';
import styles from 'e-styles/heading';
const SharedHeading = styled.h1.attrs( ( props ) => ( { as: props.tag } ) )`${ ( props ) => getStyle( styles, props, 'shared' ) }`;
const Heading = styled( SharedHeading )`${ ( props ) => getStyle( styles, props, 'unique' ) }`;
Heading.propTypes = {
className: PropTypes.string,
children: PropTypes.any,
tag: PropTypes.oneOf( [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ),
variant: PropTypes.oneOf( [ 'display-1', 'display-2', 'display-3', 'display-4', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ).isRequired,
};
Heading.defaultProps = {
className: '',
tag: 'h1',
};
export default Heading;

View File

@@ -0,0 +1,21 @@
import styled from 'styled-components';
import { getStyle } from 'e-utils';
import styles from 'e-styles/text';
const SharedText = styled.p.attrs( ( props ) => ( { as: props.tag } ) )`${ ( props ) => getStyle( styles, props, 'shared' ) }`;
const Text = styled( SharedText )`${ ( props ) => getStyle( styles, props, 'unique' ) }`;
Text.propTypes = {
className: PropTypes.string,
children: PropTypes.any,
variant: PropTypes.oneOf( [ 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' ] ),
tag: PropTypes.string,
};
Text.defaultProps = {
className: '',
tag: 'p',
};
export default Text;