import { StyleSheet, View } from "react-native"; import { haptic } from "../lib/haptics"; import { PRIORITIES, PRIORITY_COLOR, PRIORITY_LABEL, PRIORITY_TINT } from "../lib/priority"; import { C, space } from "../lib/theme"; import type { Task } from "../lib/types"; import { ChipRow, OptionChip, SectionHeader } from "./ui"; /** Omit `label` when the surrounding panel already titles the group. */ export default function PriorityChips({ value, onChange, label, }: { value: Task["priority"] | null; onChange: (p: Task["priority"]) => void; label?: string; }) { return ( {!!label && {label}} {PRIORITIES.map((p) => ( } onPress={() => { haptic.select(); onChange(p); }} /> ))} ); } const s = StyleSheet.create({ flag: { width: 9, height: 9, borderRadius: 999, backgroundColor: C.muted }, });