Component
RoundingRuling
Choose floor, ceiling or nearest-five. Each policy calculates a different visible result for the submitted number, as though a decimal needed a binding legal interpretation.
Possible use
It could let a reviewer decide whether a handoff estimate rounds down, up or toward the nearest five, or let a presenter give an agenda score a formal numerical verdict. Both uses make arithmetic policy look like governance.
Reasonable alternative
A reasonable local alternative is one explicit rounding function at the calculation boundary. A three-button ruling should not replace naming the policy in code.
01 / Preview
Try it yourself.
Submitted value27.6
Awaiting a policy—
Mechanism
- 1
- Submit one decimal value without a policy.
- 2
- Choose Floor, Ceiling or Nearest five; each yields a different result.
- 3
- Reopen the case to withdraw the ruling.
02 / Usage
Put it somewhere.
example.tsxTSX
import { RoundingRuling } from "gra-ui";
import "gra-ui/styles.css";
export function RuledScore() {
return <RoundingRuling value={27.6} />;
}03 / API
Small surface area.
PropTypeDescription
valuenumberThe decimal value submitted to three competing rounding policies.