Sha256: f56998f2a08b41c51629f4274f19c97c31af25bdd2acc478e8317ef6388cb012

Contents?: true

Size: 1.14 KB

Versions: 37

Compression:

Stored size: 1.14 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,
    dark = false,
    data = {},
    id,
    orientation = 'horizontal',
    text,
    variant = 'card',
  } = props
  const themeStyle = dark === true ? '_dark' : ''
  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle), className, globalProps(props))

  return (

    <div
        {...ariaProps}
        {...dataProps}
        className={classes}
        id={id}
    >
      <span>
        <Caption text={text} />
      </span>
    </div>
  )
}

export default SectionSeparator

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
playbook_ui-7.3.0.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.7.0.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.7.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.6.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha12 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha11 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx