Sha256: 315bff895988c1e2ed4141bb95ba898114f73beca008de27a5a61eef5fa94593
Contents?: true
Size: 1.2 KB
Versions: 297
Compression:
Stored size: 1.2 KB
Contents
import React from 'react' import classnames from 'classnames' import { globalProps } from '../utilities/globalProps' import { buildAriaProps, buildCss, buildDataProps, } from '../utilities/props' import Body from '../pb_body/_body' import Title from '../pb_title/_title' type PersonProps = { aria?: { [key: string]: string }, className?: string | string[], data?: { [key: string]: string }, firstName: string, id?: string, lastName: string, } const Person = (props: PersonProps): React.ReactElement => { const { aria = {}, className, data = {}, firstName, id, lastName } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames( buildCss('pb_person_kit'), globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} className={classes} id={id} > <Body className="pb_person_first" tag="span" > {firstName} </Body> {lastName && <Title className="pb_person_first" size={4} text={` ${lastName}`} /> } </div> ) } export default Person
Version data entries
297 entries across 297 versions & 1 rubygems