Sha256: 0f68eec2c0bb1b7cdc41218b2d468bb5a012fbb8e3cbd640da1fe74f222801ed
Contents?: true
Size: 680 Bytes
Versions: 7
Compression:
Stored size: 680 Bytes
Contents
/* @flow */ /*eslint-disable react/no-multi-comp, flowtype/space-before-type-colon */ import React from 'react' import classnames from 'classnames' type BadgeProps = { className?: String, id?: String, text?: String, variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral', rounded?: Boolean } const Badge = ({ className, id, text, variant = 'neutral', rounded = false }: BadgeProps) => { const roundedValue = rounded == true ? "rounded" : "" const css = classnames([ `pb_badge_kit_${variant}_${roundedValue}`, className, ]) return ( <div id={id} className={css}> <span>{text}</span> </div> ) } export default Badge
Version data entries
7 entries across 7 versions & 1 rubygems