UNPKG

@cmk/fe_utils

Version:
7 lines (6 loc) 271 B
export const makeOptionsFromEnum = (enumObj: { [key: string]: string }) => Object.keys(enumObj).map((key) => ({ value: enumObj[key as keyof typeof enumObj], label: enumObj[key as keyof typeof enumObj], textLabel: enumObj[key as keyof typeof enumObj], }))