import React from 'react'; import PropTypes from 'prop-types'; import './Text.scss'; function Text({ id, className, variant, children, }) { const cName = className !== '' ? `${className} ` : ''; if (variant === 'h1') return

{ children }

; if (variant === 'h2') return

{ children }

; if (variant === 's1') return

{ children }

; return

{ children }

; } Text.defaultProps = { id: '', className: '', variant: 'b1', }; Text.propTypes = { id: PropTypes.string, className: PropTypes.string, variant: PropTypes.oneOf(['h1', 'h2', 's1', 'b1', 'b2', 'b3']), children: PropTypes.node.isRequired, }; export default Text;