Priority picker
No priority to Urgent: bars, and an ember square for urgent.
import { PriorityPicker } from "@forgeron/ui";Priority
Priority
import { PriorityPicker, type PriorityLevel } from "@forgeron/ui";
import { useState } from "react";
export default function Default() {
const [priority, setPriority] = useState<PriorityLevel>(1);
return (
<>
<PriorityPicker value={priority} onChange={setPriority} />
<PriorityPicker defaultValue={3} markOnly />
</>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | 0 | 1 | 2 | 3 | 4 | — | None, urgent, high, medium, low. |
value / defaultValue | see type | — | Controlled or not. |
onChange | (value) => void | — | On a new choice. |
variant | "chip" | "field" | "chip" | A record's property, or a form control. |
markOnly | boolean | — | The mark alone, for dense rows. |
className | string | — | Extra classes. |