Sha256: 2ac97505a2c4c79f36a9edad1443e7a03600374a5d825b891fba4aff671cf30d

Contents?: true

Size: 1.18 KB

Versions: 151

Compression:

Stored size: 1.18 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,
    dark = false,
    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} dark={dark}/>
        </span>
        )
      }
    </div>
  )
}

export default SectionSeparator

Version data entries

151 entries across 151 versions & 1 rubygems

Version Path
playbook_ui-12.30.1.pre.alpha.play846responsivespacingglobalpropsneedsdefault924 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1.pre.alpha.PLAY906multilevelselectedidsprop917 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1.pre.alpha.PLAY906multilevelselectedidsprop916 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1.pre.alpha.hovertesting914 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1.pre.alpha.PLAY906multilevelselectedidsprop912 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1.pre.alpha.PLAY802responsivetitlekit909 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.0.pre.alpha.PLAY906multilevelselectedidsprop902 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.1 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.30.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.29.0.pre.alpha.play716popoverkitcloseonclickissue893 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.29.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.PLAY863multilevelv2877 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.PLAY863multilevelv2876 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.PLAY814removemomentjs871 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown869 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.PLAY837MapCustomButton868 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0.pre.alpha.20230613implementbakesupport865 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.28.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.27.0.pre.alpha.expandednotworking853 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx
playbook_ui-12.27.0 app/pb_kits/playbook/pb_section_separator/_section_separator.tsx