import { LabelHTMLAttributes } from 'react'; import styled, { css } from 'styled-components'; export interface StyledProps { themeFontSize: 10 | 12 | 14 | 16; themeFontWeight: 'light' | 'regular' | 'semi-bold' | 'bold'; themeIntent: | 'main' | 'body' | 'subdued' | 'primary' | 'success' | 'danger' | 'warning' | 'error' | 'white'; } const textCss = css` margin: 0; padding: 0; ${({ themeIntent, theme }) => { switch (themeIntent) { case 'main': return css` color: ${theme.colors.typography.main}; `; case 'body': return css` color: ${theme.colors.typography.body}; `; case 'subdued': return css` color: ${theme.colors.typography.subdued}; `; case 'primary': return css` color: ${theme.colors.typography.primary}; `; case 'success': return css` color: ${theme.colors.typography.success}; `; case 'danger': return css` color: ${theme.colors.typography.danger}; `; case 'warning': return css` color: ${theme.colors.typography.warning}; `; case 'error': return css` color: ${theme.colors.typography.error}; `; case 'white': return css` color: ${theme.colors.typography.white}; `; } }}; ${({ themeFontWeight, theme }) => { switch (themeFontWeight) { case 'light': return css` font-weight: ${theme.fontWeights.typography.light}; `; case 'regular': return css` font-weight: ${theme.fontWeights.typography.regular}; `; case 'semi-bold': return css` font-weight: ${theme.fontWeights.typography.semiBold}; `; case 'bold': return css` font-weight: ${theme.fontWeights.typography.bold}; `; } }}; ${({ themeFontSize, theme }) => { switch (themeFontSize) { case 10: return css` font-size: ${theme.fontSizes.typography.xsmall}; line-height: ${theme.lineHeights.typography.xsmall}; `; case 12: return css` font-size: ${theme.fontSizes.typography.small}; line-height: ${theme.lineHeights.typography.small}; `; case 14: return css` font-size: ${theme.fontSizes.typography.medium}; line-height: ${theme.lineHeights.typography.medium}; `; case 16: return css` font-size: ${theme.fontSizes.typography.large}; line-height: ${theme.lineHeights.typography.large}; `; } }}; `; // Suport inline elements: // * Inline elements: // * * // * * // * *