UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

47 lines (46 loc) 1.75 kB
import React from "react"; import Color from "color"; import { ProgressBarProps } from "./../../components/ProgressBar"; import { TagProps } from "./../../components/Tag"; export interface ConfidenceValueProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> { /** * Confidence value. */ value: number; /** * Minimal border for the confidence range. */ minValue?: number; /** * Center (or average) value of the confidence range. */ centerValue?: number; /** * Maximum border for the confidence range. */ maxValue?: number; /** * Color of the confidence bar. * By default it is colorized red for values below the `centerValue`, otherwise green. */ barColor?: Color | string; /** * The value is displayed by a bar. * This confidence bar can be start from the left or right side, or from the center of the element. */ barStart?: "side" | "center"; /** * What width is used to display the lement. * It could use the `minimal` necessary space, the `maximal` available space, or a `static` width. */ spaceUsage?: "minimal" | "static" | "maximal"; /** * Additional properties for the `<Tag/>` element that is used to display the confidence value. */ tagProps?: Omit<TagProps, "className">; /** * Additional properties for the `<PRogressBar/>` element that is used to display the confidence bar. */ progressBarProps?: Omit<ProgressBarProps, "className">; } export declare function ConfidenceValue({ className, value, minValue, maxValue, centerValue, barColor, barStart, spaceUsage, tagProps, progressBarProps, ...otherProps }: ConfidenceValueProps): React.JSX.Element;