import { useContext } from 'react'; import { ThemeContext } from 'styled-components'; import { Flex, Section, Text } from '../../components'; import { UIComponentProps } from '../../components/types'; import { IThemeColors } from '../../theme'; type Props = { }; export type ColorsProps = UIComponentProps; export const Colors: React.FC = (props: ColorsProps) => { const theme = useContext(ThemeContext); const color: IThemeColors = theme.color; const keys = Object.keys(color); return (
{keys.map((key) => ( {Object.keys(color[key]).map(size => ( = 500 ? '100' : '900')]} lineHeight="1.2">{key}-{size} = 500 ? '100' : '900')]}>{color[key][size]} ))} ))}
); };