Component
NumberAlibi
Choose a prime, even or triangular alibi. The component runs the selected test against the supplied number, changes the visible verdict and keeps the chosen theory until Dismiss the case restores indecision.
Possible use
It could let a reviewer decide whether a handoff identifier is sufficiently prime, pairable or stair-shaped, or let a presenter give an agenda number three incompatible credentials. A number does not become more appropriate because a panel chose its favorite property.
Reasonable alternative
A reasonable local alternative is one explicit calculation at the place where the result matters. A small status or validation message communicates a criterion without staging a trial.
01 / Preview
Try it yourself.
The number on trial42Awaiting a criterionChoose one theory; each produces a different ruling.
Mechanism
- 1
- Start with the number 42 awaiting a theory.
- 2
- Choose Prime, Even or Triangle alibi.
- 3
- Each choice runs a different mathematical test and ruling.
- 4
- Dismiss the case to return to the unexamined number.
02 / Usage
Put it somewhere.
example.tsxTSX
import { NumberAlibi } from "gra-ui";
import "gra-ui/styles.css";
export function QuestionedNumber() {
return <NumberAlibi value={42} />;
}03 / API
Small surface area.
PropTypeDescription
valuenumberThe number examined by the three independent mathematical criteria.