Sha256: dda8868855e678eb3c1146516ca329617cca3f9b91acc55bac05c0be75d0442c
Contents?: true
Size: 1.18 KB
Versions: 44
Compression:
Stored size: 1.18 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { Avatar, Body, Title } from '../' import { spacing } from '../utilities/spacing.js' type UserProps = { className?: String, id?: String, name: String, territory?: String, title?: String, size?: "sm" | "md" | "lg", align?: "left" | "center" | "right", orientation?: "horiztonal" | "vertical", avatar?: Boolean, avatarUrl?: String, } const User = (props: UserProps) => { const { name = '', territory = '', title = '', align = 'left', orientation = 'horizontal', size = 'sm', avatar = false, avatarUrl, } = props return ( <div className={classnames(`pb_user_kit_${align}_${orientation}_${size}`, spacing(props))}> <If condition={avatar || avatarUrl}> <Avatar imageUrl={avatarUrl} name={name} size={size} /> </If> <div className="content_wrapper"> <Title size={size == 'lg' ? 3 : 4} text={name} /> <Body color="light"> {territory == '' ? title : `${territory} • ${title}`} </Body> </div> </div> ) } export default User
Version data entries
44 entries across 44 versions & 1 rubygems