Sha256: 59c12a2f0feb1c8ec21c3e15404d49dcc3b40996de9d3a3d73cce0ef5f23c0a5

Contents?: true

Size: 1.1 KB

Versions: 17

Compression:

Stored size: 1.1 KB

Contents

/* @flow */
import React from 'react'
import classnames from 'classnames'
import { Caption } from '../'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps.js'

type SectionSeparatorProps = {
  aria: object,
  className: string,
  dark?: boolean,
  data: object,
  id: string,
  orientation?: "horizontal" | "vertical",
  text: string,
  variant?: "card" | "background",
}

const SectionSeparator = (props: SectionSeparatorProps) => {
  const {
    aria = {},
    className,
    data = {},
    id,
    orientation = 'horizontal',
    text,
    variant = 'card',
  } = props
  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation), globalProps(props), className)

  return (

    <div
        {...ariaProps}
        {...dataProps}
        className={classes}
        id={id}
    >

      <If condition={text}>
        <span>
          <Caption text={text} />
        </span>
      </If>

    </div>
  )
}

export default SectionSeparator

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.12.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.4.0.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-9.4.0.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx