You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This produces problem when the user wants to specify additional colors in the color palette (like there are currently lightGreen and darkOrange in teams theme). The problem is that, we cannot use these colors from the colors object, because the typings are not containing these colors, so we always have to import them from naturalColors.
Proposed solution
One possible solution that will allow the users to specify custom colors is to add generic for custom color types, so that the color palette can be defined in the following manner:
export type ColorPalette<T={}> = ExtendablePalette<
EmphasisColorsStrict & ContextualColorsStrict & NaturalColorsStrict & PrimitiveColors & T
>
export type CustomThemeColors = Partial<{
darkOrange: ColorVariants
lightGreen: ColorVariants
}>
// then in the theme...
const colors: Color<CustomThemeColors> = {...}