import * as _ from 'lodash'; import * as React from 'react'; import { createComponent, ComponentSlotStylesInput, ProviderConsumer } from '@fluentui/react-northstar'; import ColorBox from './ColorBox'; type ColorVariantsProps = { name: string; headerOnly?: boolean; size?: 'small' | 'normal' | 'big'; }; export const colorVariantsStyles: ComponentSlotStylesInput = { root: { border: '1px solid transparent', borderRadius: '.25rem', overflow: 'hidden', }, }; const ColorVariants = createComponent({ displayName: 'ColorVariants', render: ({ name, headerOnly, size, config: { classes } }) => ( (
{!headerOnly && _.map(colors[name], (value, variable) => ( ))}
)} /> ), }); ColorVariants.defaultProps = { headerOnly: false, size: 'big', }; export default ColorVariants;