Sha256: 1ba07f618381da2c82dd58e6b23e0a43e4608ec4af600a15e330a693437ce25d

Contents?: true

Size: 676 Bytes

Versions: 38

Compression:

Stored size: 676 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'

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 css = classnames(className, buildCss('pb_badge_kit', variant, {
    'rounded': rounded,
    'dark': dark,
  }))

  return (
    <div
        className={css}
        id={id}
    >
      <span>{text}</span>
    </div>
  )
}

export default Badge

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
playbook_ui-4.17.0.pre.alpha1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.16.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.15.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.14.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.13.1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.13.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.12.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.11.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.10.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.10.0.pre.alpha1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.9.0.pre.alpha1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.9.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.8.2 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.8.1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.7.1 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.7.0 app/pb_kits/playbook/pb_badge/_badge.jsx
playbook_ui-4.6.1 app/pb_kits/playbook/pb_badge/_badge.jsx