Skip to content

PUIImmutableNumericStatus

Elijah Cobb edited this page May 13, 2021 · 3 revisions

This component displays a numeric status. You can define a specific number of decimal places to display. If you supply a range, if the value is outside of the range, the text will become PUIColor.red. Clicking on this component will copy it to the clipboard.

import {PUIImmutableNumericStatus} from "./pstdl-ui";
import {ReactElement, useState} from "react";

export function TestBed(): ReactElement {

   const [number, setNumber] = useState(32.871);

   return <div className={"TestBed"}>
      <PUIImmutableNumericStatus
			value={number}
			label={"Number"}
			range={[20, 40]}
			precision={2}
		/>
   </div>
}

image-20210513184752481

image-20210513184930435