Sha256: 6994197c137e01903cf4b61b2781126b34e010204c5f1aabe9454e6cac6e405a
Contents?: true
Size: 1.14 KB
Versions: 358
Compression:
Stored size: 1.14 KB
Contents
import React from 'react' import classnames from 'classnames' import Title from '../pb_title/_title' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import { GlobalProps, globalProps } from '../utilities/globalProps' type PillProps = { aria?: {[key: string]: string}, className?: string, data?: {[key: string]: string}, id?: string, text: string, variant?: "success" | "warning" | "error" | "info" | "neutral" | "primary", textTransform?: "none" | "lowercase" } & GlobalProps const Pill = (props: PillProps) => { const { aria = {}, className, data = {}, id, text, variant = 'neutral', textTransform = 'lowercase', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames(buildCss('pb_pill_kit', variant, textTransform), 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
358 entries across 358 versions & 1 rubygems