Sha256: fbc4e8f18ca2f68136a308d97b282cecbb9e012c5e706cdefa16ef348c733d60
Contents?: true
Size: 999 Bytes
Versions: 7
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
7 entries across 7 versions & 1 rubygems