Sha256: 6249e714bec6c324e5a65e47eee02b4e61c7769c3c1495647a1d4864da97885f
Contents?: true
Size: 1 KB
Versions: 46
Compression:
Stored size: 1 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import Title from '../pb_title/_title.jsx' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps.js' type PillProps = { aria?: object, className?: string, data?: object, id?: string, text: string, variant?: "success" | "warning" | "error" | "info" | "neutral", } const Pill = (props: PillProps) => { const { aria = {}, className, data = {}, id, text, variant = 'neutral', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames(buildCss('pb_pill_kit', variant), globalProps(props), className) return ( <div {...ariaProps} {...dataProps} className={classes} id={id} > <Title className="pb_pill_text" size={4} tag="div" text={text} /> </div> ) } export default Pill
Version data entries
46 entries across 46 versions & 1 rubygems