Sha256: c5a8a384ea51f6401b5bbce339a1aeb5b4e387fb3dc87b7f51c6719fbe3fbaff

Contents?: true

Size: 1.24 KB

Versions: 50

Compression:

Stored size: 1.24 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'
import { DateStacked, IconCircle } from '..'

type ItemProps = {
  className?: string,
  children?: Array<React.Node>,
  date?: Date,
  icon?: string,
  iconColor?: 'default' | 'royal' | 'blue' | 'purple' | 'teal' | 'red' | 'yellow' | 'green',
  lineStyle?: 'solid' | 'dotted',
}

const TimelineItem = ({
  className,
  children,
  date,
  icon = 'user',
  iconColor = 'default',
  lineStyle = 'solid',

}: ItemProps) => {
  const timelineItemCss = buildCss('pb_timeline_item_kit', lineStyle)

  return (
    <div className={classnames(timelineItemCss, className)}>
      <div className="pb_timeline_item_left_block">
        <If condition={date}>
          <DateStacked
              align="center"
              date={date}
              size="sm"
          />
        </If>
      </div>
      <div className="pb_timeline_item_step">
        <IconCircle
            icon={icon}
            size="xs"
            variant={iconColor}
        />
        <div className="pb_timeline_item_connector" />
      </div>
      <div className="pb_timeline_item_right_block">
        {children}
      </div>
    </div>
  )
}

export default TimelineItem

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha10 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.5.1 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.5.0 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.5.0.pre.alpha1 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha9 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha8 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha7 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.3.0.pre.alpha1 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.4.0 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha6 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha5 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.3.0 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha4 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha3 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0.pre.alpha2 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.2.0 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.1.0 app/pb_kits/playbook/pb_timeline/_item.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_timeline/_item.jsx