Sha256: 9ce5687c5ab9d7c7417922f651a5aa6f1a9dde8f981671e4592ed5e8a5677df4
Contents?: true
Size: 1.3 KB
Versions: 483
Compression:
Stored size: 1.3 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?: "away" | "error" | "info" | "neutral" | "offline" |"online" | "primary"| "success" | "warning", size?: "sm" | "md" | "lg", noBorder?: boolean, } & GlobalProps const OnlineStatus = (props: OnlineStatusProps) => { const { aria = {}, className, data = {}, htmlOptions = {}, id, status = 'offline', size = 'sm', noBorder = false, } = props aria.label = status const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) const getBorder = noBorder ? 'no_border' : '' const classes = classnames(buildCss('pb_online_status_kit', status, getBorder, "size", size), globalProps(props), className) return ( <div {...ariaProps} {...dataProps} {...htmlProps} className={classes} id={id} /> ) } export default OnlineStatus
Version data entries
483 entries across 483 versions & 1 rubygems