fix(types): improve intellisense with colors (#25347)

This commit is contained in:
Sean Perkins
2022-05-25 14:06:19 -04:00
committed by GitHub
parent 8f5e4cd935
commit 97cfbbb65d
2 changed files with 40 additions and 37 deletions

View File

@@ -133,7 +133,10 @@ export type PredefinedColors =
| 'light'
| 'medium'
| 'dark';
export type Color = PredefinedColors | string;
type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
export type Color = LiteralUnion<PredefinedColors, string>;
export type Mode = 'ios' | 'md';
export type ComponentTags = string;
// eslint-disable-next-line