Sha256: 96591426a9e6ffcc2557d304b8f60f8f567bf89d51d2ca9a8d6868cf18c1fa62
Contents?: true
Size: 1.05 KB
Versions: 24
Compression:
Stored size: 1.05 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps.js' type TitleProps = { aria?: object, children?: array<React.ReactNode> | React.ReactNode, className?: string, data?: object, id?: string, size?: 1 | 2 | 3 | 4, tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span", text?: string, variant?: null | "link", } const Title = (props: TitleProps) => { const { aria = {}, children, className, data = {}, id, size = 3, tag = 'h3', text, variant = null, } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames(buildCss('pb_title_kit', size, variant), className, globalProps(props)) const Tag = `${tag}` return ( <Tag {...ariaProps} {...dataProps} className={classes} id={id} > {text || children} </Tag> ) } export default Title
Version data entries
24 entries across 24 versions & 1 rubygems