Sha256: 4caa4a2b70a461c8699800913c388392acd4b9eae09d4d2f0c7ae983ef31f370
Contents?: true
Size: 756 Bytes
Versions: 4
Compression:
Stored size: 756 Bytes
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildCss } from '../utilities/props' import { spacing } from '../utilities/spacing.js' type CaptionProps = { className?: String, children: Array<React.ReactNode> | React.ReactNode, dark?: Boolean, size?: "xs" | "sm" | "md" | "lg" | "xl", tag: String, text: String, } const Caption = (props: CaptionProps) => { const { className, children, dark = false, size = 'md', tag = 'div', text, } = props const Tag = `${tag}` const css = classnames( buildCss('pb_caption_kit', size, { dark: dark, }), className, spacing(props) ) return <Tag className={css}>{text || children}</Tag> } export default Caption
Version data entries
4 entries across 4 versions & 1 rubygems