Sha256: b88ac4b3c5620e1a5e67036be35417f30bef0dd964ce6cbca5673512aa39dac4
Contents?: true
Size: 999 Bytes
Versions: 3
Compression:
Stored size: 999 Bytes
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { globalProps } from '../utilities/globalProps.js' import { buildAriaProps, buildCss, buildDataProps, } from '../utilities/props' type BadgeProps = { aria?: object, className?: string, data?: object, id?: string, rounded?: boolean, text?: string, variant?: "error" | "info" | "neutral" | "primary" | "success" | "warning", } const Badge = (props: BadgeProps) => { const { aria = {}, className, data = {}, id, rounded = false, text, variant = 'neutral', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const css = classnames( className, buildCss('pb_badge_kit', variant, { rounded: rounded, }), globalProps(props) ) return ( <div {...ariaProps} {...dataProps} className={css} id={id} > <span>{text}</span> </div> ) } export default Badge
Version data entries
3 entries across 3 versions & 1 rubygems