Sha256: 8511663a441af7c3ce0d946e3c8c87b7ef8e697fd1f7dc72fd297e5bec6f1c29

Contents?: true

Size: 986 Bytes

Versions: 38

Compression:

Stored size: 986 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'

import { Icon, Title } from '../'

const iconMap = {
  'success': 'check',
  'error': 'exclamation-triangle',
  'neutral': 'info-circle',
  'tip': 'info-circle',
}

type FixedConfirmationToastProps = {
  className?: String,
  data?: String,
  id?: String,
  status?: 'success' | 'error' | 'neutral' | 'tip',
  text: String,
}

const FixedConfirmationToast = ({
  className,
  status = 'neutral',
  text,
}: FixedConfirmationToastProps) => {
  const css = classnames(className, `pb_fixed_confirmation_toast_kit_${status}`)
  const icon = iconMap[status]

  return (
    <div className={css}>
      <If condition={icon}>
        <Icon
            className="pb_icon"
            fixed_width
            icon={icon}
        />
      </If>
      <Title
          className="pb_fixed_confirmation_toast_text"
          size={4}
          text={text}
      />
    </div>
  )
}

export default FixedConfirmationToast

Version data entries

38 entries across 38 versions & 1 rubygems

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