Sha256: 6fcd986084e5ed506e39c0a78ef35217f3606dd0728e4579d6aaefd7b5a7e225
Contents?: true
Size: 1.08 KB
Versions: 93
Compression:
Stored size: 1.08 KB
Contents
import React from 'react' import classnames from 'classnames' import { GlobalProps, globalProps } from '../utilities/globalProps' import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props' type OnlineStatusProps = { aria?: {[key: string]: string}, className?: string, data?: {[key: string]: string | number}, htmlOptions?: {[key: string]: string | number | boolean | (() => void)}, id?: string, status?: "online" | "offline" | "away", } & GlobalProps const OnlineStatus = (props: OnlineStatusProps) => { const { aria = {}, className, data = {}, htmlOptions = {}, id, status = 'offline', } = props aria.label = status const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) const classes = classnames(buildCss('pb_online_status_kit', status), globalProps(props), className) return ( <div {...ariaProps} {...dataProps} {...htmlProps} className={classes} id={id} /> ) } export default OnlineStatus
Version data entries
93 entries across 93 versions & 1 rubygems