import React from 'react'; import { Text, Row } from 'components'; import styled from '@emotion/native'; import { color, ThemedBackgroundColorProps } from 'styled-system'; import { ColorName } from '@emotion/react'; import { COLOR_DARK } from './color'; export default { title: 'Design System/Theme/Color', }; interface ColorBlockProps { color: ColorName; } // use `ThemedBackgroundColorProps` to further scope the props to only allow `backgroundColor` const Swatch = styled.View( { height: 56, width: 56, marginRight: 16, borderRadius: 8, }, color ); const ColorBlock: React.FC = ({ color: colorName }) => { return ( {colorName} ); }; export const Variants: React.FC = () => { const colorNames = Object.keys(COLOR_DARK) as ColorName[]; return ( {colorNames.map((c) => ( ))} ); };