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