Sha256: f7ddc6fc721fba36df2b5d289d82c021d640d1be202467452f6c678d8a5faf54
Contents?: true
Size: 1.34 KB
Versions: 10
Compression:
Stored size: 1.34 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' type IconValueProps = { align?: "left" | "center" | "right", aria?: { [key: string]: string; }, className?: string, dark?: boolean, data?: object, icon: string, htmlOptions?: {[key: string]: string | number | boolean | Function}, id?: string, text: string, } const IconValue = (props: IconValueProps) => { 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
10 entries across 10 versions & 1 rubygems