Sha256: 3bf8ccf61db0df02bb889ef6d26473a5aede89f6657bacb966fa95077f7bd6cb

Contents?: true

Size: 1.31 KB

Versions: 186

Compression:

Stored size: 1.31 KB

Contents

import React, { useState } from 'react'

import ProgressStep from '../_progress_step.jsx'
import ProgressStepItem from '../_progress_step_item'

import Caption from '../../pb_caption/_caption'
import Button from '../../pb_button/_button'

const ProgressStepTrackerClickEvents = (props) => {
  const [warning, setWarning] = useState(false)
  const showWarning = warning == true
  const WarningIcon = (
    <ProgressStepItem
        icon="exclamation-triangle"
        key={Math.random()}
        status="active"
    >
      <Caption>{'Shipped'}</Caption>
    </ProgressStepItem>
  )
  const CheckedIcon = (
    <ProgressStepItem
        key={Math.random()}
        status="active"
    >
      <Caption>{'Shipped'}</Caption>
    </ProgressStepItem>
  )
  return (
    <div>
      <Button onClick={() => setWarning(!warning)}>{'Toggle State'}</Button>
      <br />
      <br />
      <br />
      <ProgressStep
          icon
          variant="tracker"
          {...props}
      >
        <ProgressStepItem status="complete">
          <Caption>{'Ordered'}</Caption>
        </ProgressStepItem>
        {showWarning ? WarningIcon : CheckedIcon}
        <ProgressStepItem status="inactive">
          <Caption>{'Delivered'}</Caption>
        </ProgressStepItem>
      </ProgressStep>
    </div>
  )
}

export default ProgressStepTrackerClickEvents

Version data entries

186 entries across 186 versions & 1 rubygems

Version Path
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark301 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark300 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0.pre.alpha.PLAY649mapkitstyles299 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease296 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease295 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease294 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.8.0 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.rubyandnpmalpharelease293 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.rubyandnpmalpharelease292 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.rubyandnpmalpharelease291 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.alpharubyrelease281 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.menu2 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1.pre.alpha.menu1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.7.0 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.6.0.pre.alpha.sectionseparator1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.6.0.pre.alpha.menuyml1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.6.0.pre.alpha.collapsible1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.6.0.pre.alpha.cssphone1 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx
playbook_ui-12.6.0 app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker_click_events.jsx