Sha256: 426d196ca1a7e788b30975766716aeb3476c9bf811ed2b7f8f2efbab4dd15d17

Contents?: true

Size: 1.15 KB

Versions: 13

Compression:

Stored size: 1.15 KB

Contents

import React from 'react'
import classnames from 'classnames'

import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps'

import Caption from '../pb_caption/_caption'

type SectionSeparatorProps = {
  aria: { [key: string]: string; },
  className: string,
  dark?: boolean,
  data: { [key: string]: string; },
  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}
    >
      {
        text && (
          <span>
          <Caption text={text} />
        </span>
        )
      }
    </div>
  )
}

export default SectionSeparator

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
playbook_ui-11.6.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.5.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.7.0.pre.alpha.pre.guagechart1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.6.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.6.0.pre.alpha.rubocopperf1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.6.1.pre.alpha.rubocop.pre.performance1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.5.0.pre.alpha.pre.rubocop app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.6.0.pre.alpha.momenttz1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.5.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.4.0.pre.alpha.rubytheme2 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.4.0.pre.alpha.rubytheme1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.4.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx