Sha256: 81a3972675533b7aa7a035ee1a6df8b35e443e3dc8c326c3b9d0f63c2e0f771e

Contents?: true

Size: 1.14 KB

Versions: 18

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), globalProps(props), className)

  return (

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

export default SectionSeparator

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
playbook_ui-7.1.2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.1.0.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.1.1.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.1.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.1.0.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.1.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha15 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.8.2.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha15 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.1.pre.alpha14 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha14 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha13 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha12 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-7.0.0.pre.alpha11 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.8.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.8.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx