Sha256: 1963476b1369d75c71ac7fb5369b18cd9a31e31faeccc368d3566eeaaf6e84f4
Contents?: true
Size: 928 Bytes
Versions: 36
Compression:
Stored size: 928 Bytes
Contents
/* @flow */ import React from 'react' import { buildCss } from '../utilities/props' import { Body, Title, } from '../' type LegendProps = { color?: 'data_1' | 'data_2' | 'data_3' | 'data_4' | 'data_5' | 'data_6' | 'data_7', dark?: Boolean, prefixText?: String, text: String, } const Legend = ({ color = 'data_1', dark = false, prefixText, text, }: LegendProps) => { const darkClass = dark ? 'dark' : 'light' const bodyCSS = buildCss('pb_legend_kit', color, darkClass) return ( <div className={bodyCSS}> <Body color={dark ? 'lighter' : 'light'} > <span className="pb_legend_indicator_circle" /> <If condition={prefixText}> <Title dark={dark} size={4} tag="span" text={` ${prefixText} `} /> </If> {` ${text} `} </Body> </div> ) } export default Legend
Version data entries
36 entries across 36 versions & 1 rubygems