Как правильно кастомизировать тему в material ui 5

Пытаюсь кастомизировать тему в последнем material ui, использую вместе с typescrypt, при использовании в компненте в пропсе color цвет меняется но выпадает ошибка:

"No overload matches this call.
  Overload 1 of 2, '(props: { component: ElementType<any>; } & Omit<PaperProps<"div", {}>, "classes" | "color" | "position"> & { classes?: Partial<AppBarClasses> | undefined; color?: "inherit" | ... 4 more ... | undefined; enableColorOnDark?: boolean | undefined; position?: "fixed" | ... 4 more ... | undefined; sx?: SxProps<...> | undefined; } & CommonProps & Omit<...>): Element', gave the following error.
    Type '"critical"' is not assignable to type '"inherit" | "default" | "primary" | "secondary" | "transparent" | undefined'.
  Overload 2 of 2, '(props: DefaultComponentProps<AppBarTypeMap<{}, "header">>): Element', gave the following error.
    Type '"critical"' is not assignable to type '"inherit" | "default" | "primary" | "secondary" | "transparent" | undefined'."
export const errorTypesMap = {
  critical: "critical",
  high: "high",
  medium: "medium",
  low: "low",
};


export const theme = createTheme({
  palette: {

    [errorTypesMap.critical]: {
      main: "green",
    },

    [errorTypesMap.high]: {
      main: "#ff955c",
    },

    [errorTypesMap.medium]: {
      main: "#feba40",
    },

    [errorTypesMap.low]: {
      main: "#c7caec",
    },
})

Ответы (0 шт):