Sha256: 0a27eb3c39afd94d4b2f7057125791bca6fdcdc7c87893dd242a7eaac0f3e2f0

Contents?: true

Size: 1016 Bytes

Versions: 38

Compression:

Stored size: 1016 Bytes

Contents

/* @flow */

import React from 'react'

import {
  Avatar,
  Body,
  Title,
} from '../'

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 = ({
  name = '',
  territory = '',
  title = '',
  align = 'left',
  orientation = 'horizontal',
  size = 'sm',
  avatar = false,
  avatarUrl,
}: UserProps) => (
  <div className={`pb_user_kit_${align}_${orientation}_${size}`}>
    <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

38 entries across 38 versions & 1 rubygems

Version Path
playbook_ui-4.6.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.5.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.4.1 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.4.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.3.1 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.3.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.2.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.1.2 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.1.1 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.1.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.0.1 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-4.0.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-3.5.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-3.4.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-3.3.0 app/pb_kits/playbook/pb_user/_user.jsx
playbook_ui-3.2.0 app/pb_kits/playbook/pb_user/_user.jsx