Sha256: f423f0c61eec8243701c8072df9270fcab57759c6814fb91a72de893096c9fd1

Contents?: true

Size: 671 Bytes

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
playbook_ui-6.2.1 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-6.2.0 app/pb_kits/playbook/pb_pill/_pill.jsx
playbook_ui-7.0.0.pre.alpha1 app/pb_kits/playbook/pb_pill/_pill.jsx