Sha256: 98d9b0ea41f85e2d0cb031fb826adf4a774d3ec2105c1e4d41c3d1dc42c0cfc1

Contents?: true

Size: 1.05 KB

Versions: 44

Compression:

Stored size: 1.05 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { Icon, Title } from '../'
import { spacing } from '../utilities/spacing.js'

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 = (props: FixedConfirmationToastProps) => {
  const { className, status = 'neutral', text } = props
  const css = classnames(
    className,
    `pb_fixed_confirmation_toast_kit_${status}`,
    spacing(props)
  )
  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

44 entries across 44 versions & 1 rubygems

Version Path
playbook_ui-5.2.0.pre.alpha8 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha7 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.3.0.pre.alpha1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.4.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha6 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha5 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.3.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha4 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha3 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0.pre.alpha2 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.2.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.1.0 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.0.2 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.0.1.pre.beta app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.1.0.pre.alpha4 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.1.0.pre.alpha2 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.1.0.pre.alpha1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.0.1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
playbook_ui-5.0.1.pre.alpha1 app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx