Sha256: a52fdf5fe6bea1f1b7a1e0b263cfce0412101a86d1366afa0100af22dee85763
Contents?: true
Size: 702 Bytes
Versions: 38
Compression:
Stored size: 702 Bytes
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' type TitleProps = { className?: String, children?: Array<React.ReactNode> | React.ReactNode, dark?: Boolean, size?: 1 | 2 | 3 | 4, text?: String, tag?: 'h1' | 'h2' | 'h3', } const tagCSS = ({ dark = false, size = 3, }) => { let css = '' css += `_${size}` css += dark === true ? '_dark' : '' return css } const Title = (props: TitleProps) => { const { className, children, text, tag = 'h3', } = props const Tag = `${tag}` return ( <Tag className={classnames(`pb_title_kit${tagCSS(props)}`, className)}> { text || children } </Tag> ) } export default Title
Version data entries
38 entries across 38 versions & 1 rubygems