I'm trying to figure out how to make a chakra-react-select form, with options for selection that are defined as an enum in the Prisma schema as follows:
enum Category {
FUTURE
NATURAL
SOCIAL
}
I can see the form in the docs looks as follows:
<Select
isMulti
options={[
{
label: "I am red",
value: "I-am-red",
},
{
label: "I fallback to purple",
value: "i-am-purple",
}
]}
placeholder="Select categories"
closeMenuOnSelect={true}
onChange={onChange}
onBlur={onBlur}
value={value}
ref={ref}
/>
I can't find an example of how to make the prisma enum Category, the select options. I don't care if both label and value are the categories.
How can I use enum values as the select options?