Sha256: 28f78e0495e02aa8ae8a94bc158f9d3fb9fe88b0b7c0ee1391091b8e9a9e1d6e
Contents?: true
Size: 979 Bytes
Versions: 132
Compression:
Stored size: 979 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( buildCss('pb_badge_kit', variant, { rounded }), globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} className={css} id={id} > <span>{text}</span> </div> ) } export default Badge
Version data entries
132 entries across 132 versions & 1 rubygems