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.6.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.5.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.4.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.4.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.3.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.3.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.2.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.1.2 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.1.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.1.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.0.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-4.0.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-3.5.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-3.4.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-3.3.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-3.2.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx