Blocks / Priority picker

Priority picker

No priority to Urgent: bars, and an ember square for urgent.

import { PriorityPicker } from "@forgeron/ui";
/01 → Default
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
PropTypeDefaultDescription
value0 | 1 | 2 | 3 | 4—None, urgent, high, medium, low.
value / defaultValuesee type—Controlled or not.
onChange(value) => void—On a new choice.
variant"chip" | "field""chip"A record's property, or a form control.
markOnlyboolean—The mark alone, for dense rows.
classNamestring—Extra classes.