Sha256: 09b2be3229510ce9ff8521bcd9de36543d18bcc7bb03a8842b01fa2f0f905a08
Contents?: true
Size: 776 Bytes
Versions: 5
Compression:
Stored size: 776 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, dark?: Boolean, id?: String, text?: String, variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral', rounded?: Boolean } const Badge = ({ className, dark = false, id, text, variant = 'neutral', rounded = false }: BadgeProps) => { const roundedClass = rounded === true ? "rounded" : "" const darkClass = dark === true ? "dark" : "" const css = classnames([ `pb_badge_kit_${variant}_${roundedClass}_${darkClass}`, className, ]) return ( <div id={id} className={css}> <span>{text}</span> </div> ) } export default Badge
Version data entries
5 entries across 5 versions & 1 rubygems