Sha256: 973d2a09b53a822dc3cc5eb8e645998154abbef5e19abb50e28fc9f58a687263

Contents?: true

Size: 1.15 KB

Versions: 60

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

60 entries across 60 versions & 1 rubygems

Version Path
playbook_ui-12.6.0.pre.alpha.menuyml1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.6.0.pre.alpha.collapsible1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.6.0.pre.alpha.cssphone1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.6.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.5.0.pre.alpha.datepickerinput1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.5.0.pre.alpha.phonerails1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.5.0.pre.alpha.filter1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.5.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.4.0.pre.alpha.map1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.4.0.pre.alpha.devdocstest1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.4.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.3.1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.3.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.2.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.1.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.0.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx