import React from "react"; import { switchProp, ifNotProp, ifProp } from "styled-tools"; import { Box, BoxProps } from "rebass/styled-components"; import styled, { css } from "styled-components"; import { FC, CSSProperties } from "react"; import { Colors } from "../consts"; interface Props extends Omit { as?: string; htmlFor?: string; light?: boolean; normal?: boolean; bold?: boolean; style?: CSSProperties; } const Text: FC = styled(Box)` font-weight: 400; ${ifNotProp( "fontSize", css` font-size: ${switchProp("a", { p: "1rem", h1: "1.802em", h2: "1.602em", h3: "1.424em", h4: "1.266em", h5: "1.125em" })}; ` )} ${ifProp( "light", css` font-weight: 300; ` )} ${ifProp( "normal", css` font-weight: 400; ` )} ${ifProp( "bold", css` font-weight: 700; ` )} `; Text.defaultProps = { color: Colors.Text }; export default Text; export const H1: FC = (props) => ; export const H2: FC = (props) => ; export const H3: FC = (props) => ; export const H4: FC = (props) => ; export const H5: FC = (props) => ; export const H6: FC = (props) => ; export const Span: FC = (props) => ;