Sha256: 5a394692b786f65d462def70bbc65fe19d755281b0c1fb28557df66fa2785ec0

Contents?: true

Size: 1.37 KB

Versions: 134

Compression:

Stored size: 1.37 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; },
  children?: React.ReactChild[] | React.ReactChild,
  className?: string,
  dark?: boolean,
  data?: { [key: string]: string; },
  id?: string,
  lineStyle?: "solid" | "dashed",
  orientation?: "horizontal" | "vertical",
  text?: string,
  variant?: "card" | "background",
}

const SectionSeparator = (props: SectionSeparatorProps) => {
  const {
    aria = {},
    children,
    className,
    data = {},
    id,
    lineStyle = 'solid',
    orientation = 'horizontal',
    text,
    dark = false,
    variant = 'card',
  } = props
  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, lineStyle === "dashed" ? lineStyle : ""), globalProps(props), className)

  return (

    <div
      {...ariaProps}
      {...dataProps}
      className={classes}
      id={id}
    >
      {
        children && children ||
        text && (
          <span>
            <Caption text={text} dark={dark} />
          </span>
        )
      }
    </div>
  )
}

export default SectionSeparator

Version data entries

134 entries across 134 versions & 1 rubygems

Version Path
playbook_ui-12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.38.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.37.0.pre.alpha.svgiconmethods1064 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31062 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.37.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.svgiconmethods1059 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1058 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1050 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1047 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.svgiconmethods1043 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0.pre.alpha.PLAY942collapsiblenav21035 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.36.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.35.0.pre.alpha.iconpocwebfonts1023 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.35.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.34.0.pre.alpha.fixdialogcloseevents1004 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.34.0.pre.alpha.fixdialogcloseevents1003 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.34.0.pre.alpha.play716popoverkitcloseonclickissue998 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.34.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.33.1.pre.alpha.PLAY933navkitcollapsible994 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.33.1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx