Sha256: 5b6ede41902cd288fc00b5d13b806a24af25eff4fda38e6ef124fb4054897d05
Contents?: true
Size: 1.18 KB
Versions: 53
Compression:
Stored size: 1.18 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { globalProps } from '../utilities/globalProps.js' import { buildAriaProps, buildDataProps } from '../utilities/props' import Pill from '../pb_pill/_pill' import Caption from '../pb_caption/_caption' type LabelPillProps = { aria?: object, className?: string, data?: object, id?: string, label?: string, pillValue?: string, variant: "error" | "info" | "neutral" | "primary" | "success" | "warning", } const LabelPill = (props: LabelPillProps) => { const { aria = {}, className, data = {}, id, label, pillValue, variant = 'neutral', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const css = classnames( 'pb_label_pill_kit', globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} className={css} id={id} > <Caption className="pb_label_pill_label" text={label} /> <Pill className="pb_label_pill_pill" text={pillValue} variant={variant} /> </div> ) } export default LabelPill
Version data entries
53 entries across 53 versions & 1 rubygems