Sha256: fa1884c56c22bce8fda48f38e8179914b977089209118bc708f671d7284d6eca

Contents?: true

Size: 846 Bytes

Versions: 122

Compression:

Stored size: 846 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { globalProps } from '../utilities/globalProps.js'

import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'

type OnlineStatusProps = {
  aria?: object,
  className?: string,
  data?: object,
  id?: string,
  status?: "online" | "offline" | "away",
}

const OnlineStatus = (props: OnlineStatusProps) => {
  const {
    aria = {},
    className,
    data = {},
    id,
    status = 'offline',
  } = props

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_online_status_kit', status), globalProps(props), className)

  return (
    <div
        {...ariaProps}
        {...dataProps}
        className={classes}
        id={id}
    />
  )
}

export default OnlineStatus

Version data entries

122 entries across 122 versions & 1 rubygems

Version Path
playbook_ui-6.5.0 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-6.4.1 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-6.4.0 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-6.3.1 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha4 app/pb_kits/playbook/pb_online_status/_online_status.jsx
playbook_ui-7.0.0.pre.alpha3 app/pb_kits/playbook/pb_online_status/_online_status.jsx