Sha256: a6ab68ec1d5d6b81c19c6110021b3797c422657cc30032ce7928ebc79e4bba4a

Contents?: true

Size: 1.12 KB

Versions: 43

Compression:

Stored size: 1.12 KB

Contents

/* @flow */
import React from 'react'
import classnames from 'classnames'
import { Caption } from '../'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { spacing } from '../utilities/spacing.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, spacing(props))

  return (

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

export default SectionSeparator

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
playbook_ui-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.0.1.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.0.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-6.0.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.1.pre.alpha4 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.1.pre.alpha3 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha10 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.0 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.5.0.pre.alpha1 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx
playbook_ui-5.2.0.pre.alpha9 app/pb_kits/playbook/pb_section_separator/_section_separator.jsx