Sha256: d2b1a0edcbe4d8340f712e0ea848603753adac8aac00b9b2775239d239c9ad29
Contents?: true
Size: 1.81 KB
Versions: 37
Compression:
Stored size: 1.81 KB
Contents
import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props' import { globalProps, globalInlineProps } from '../utilities/globalProps' import Caption from '../pb_caption/_caption' type SectionSeparatorProps = { aria?: { [key: string]: string; }, children?: React.ReactChild[] | React.ReactChild, className?: string, color?: "default" | "primary", dark?: boolean, data?: { [key: string]: string; }, htmlOptions?: {[key: string]: string | number | boolean | (() => void)}, id?: string, lineStyle?: "solid" | "dashed", orientation?: "horizontal" | "vertical", text?: string, variant?: "card" | "background", } const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => { const { aria = {}, children, className, color ="default", data = {}, htmlOptions = {}, id, lineStyle = 'solid', orientation = 'horizontal', text, dark = false, variant = 'card', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, lineStyle === "dashed" ? lineStyle : "", color !== "default" ? `color_${color}` : ''), globalProps(props), className) const dynamicInlineProps = globalInlineProps(props) return ( <div {...ariaProps} {...dataProps} {...htmlProps} className={classes} id={id} style={dynamicInlineProps} > { children && children || text && ( <span> <Caption dark={dark} text={text} /> </span> ) } </div> ) } export default SectionSeparator
Version data entries
37 entries across 37 versions & 1 rubygems