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-13.8.0.pre.alpha.PLAY1016reactionbuttonemojibug1245 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.8.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.7.0.pre.alpha.play845allkitsbytypes1234 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.7.0.pre.alpha.play845allkitsbytypes1232 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.7.0.pre.alpha.play845allkitsbytypes1231 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.7.0.pre.alpha.play978makehighchartsadevdependencypoc1223 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.6.0.pre.alpha.play845allkitsbytypes1219 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.7.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.6.0.pre.alpha.tiptapreacthookformbug1210 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.6.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.5.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.4.0.pre.alpha.PLAY973Hash1181 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.4.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.3.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-13.2.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx