Sha256: 3bd3d84abb57ffe2ba9aa7ef7be8b0798183914286e9bc3ea949d5c99d6c85eb
Contents?: true
Size: 797 Bytes
Versions: 28
Compression:
Stored size: 797 Bytes
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildCss } from '../utilities/props' import { spacing } from '../utilities/spacing.js' type BadgeProps = { className?: String, dark?: Boolean, id?: String, text?: String, variant?: "success" | "warning" | "error" | "info" | "neutral", rounded?: Boolean, } const Badge = (props: BadgeProps) => { const { className, dark = false, id, text, variant = 'neutral', rounded = false, } = props const css = classnames( className, buildCss('pb_badge_kit', variant, { rounded: rounded, dark: dark, }), spacing(props) ) return ( <div className={css} id={id} > <span>{text}</span> </div> ) } export default Badge
Version data entries
28 entries across 28 versions & 1 rubygems