Sha256: e39d0440a74a2188b5e71ec037faa73c41e65e439df98eb9b202388a9f881181
Contents?: true
Size: 1.41 KB
Versions: 663
Compression:
Stored size: 1.41 KB
Contents
import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps' import Body from '../pb_body/_body' import Icon from '../pb_icon/_icon' import { GenericObject } from '../types' type IconValueProps = { align?: "left" | "center" | "right", aria?: { [key: string]: string; }, className?: string, dark?: boolean, data?: GenericObject, icon: string, htmlOptions?: {[key: string]: string | number | boolean | (() => void)}, id?: string, text: string, } const IconValue = (props: IconValueProps): React.ReactElement => { const { align = 'left', aria = {}, className, dark, data = {}, htmlOptions = {}, icon, id, text, } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) const classes = classnames( buildCss('pb_icon_value_kit', align), globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} {...htmlProps} className={classes} id={id} > <Body color="light" dark={dark} > <Icon dark={dark} fixedWidth icon={icon} /> {text} </Body> </div> ) } export default IconValue
Version data entries
663 entries across 663 versions & 1 rubygems