Sha256: 3b319f63983d482eb96b3eff695e737289771c985bb7c472e61724953c5696f8

Contents?: true

Size: 671 Bytes

Versions: 7

Compression:

Stored size: 671 Bytes

Contents

/* @flow */

import React from 'react'

import classnames from 'classnames'
import Title from '../pb_title/_title.jsx'
import { globalProps } from '../utilities/globalProps.js'

type PillProps = {
  className?: String,
  id?: String,
  text: String,
  variant?: "success" | "warning" | "error" | "info" | "neutral",
}

const Pill = (props: PillProps) => {
  const { className, text, variant = 'neutral' } = props
  const css = classnames([`pb_pill_kit_${variant}`, className], globalProps(props))

  return (
    <div className={css}>
      <Title
          className="pb_pill_text"
          size={4}
          text={text}
      />
    </div>
  )
}

export default Pill

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
playbook_ui-6.1.0.pre.alpha5 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.1.0.pre.alpha4 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.1.0.pre.alpha3 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.1.0.pre.alpha2 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.1.0.pre.alpha1 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.1.0 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.0.1.pre.alpha6 app/pb_kits/playbook/pb_pill/_pill.jsx