From 15a9bd71dccb13f54dd211d4650dee8d3e0728d5 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:49:25 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Types=20Docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/types.ts | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index b6d19844..62a54085 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -4,22 +4,40 @@ interface Frames { }; } +/** + * Hex Colors in string Formate. + * + * `Example: `"#FFFFFF" + */ +type HexColor = string; + +/** + * @Colors expect `base`, `outline` & `watch-background` colors in **HexColor** Format. + * @default background is `base` color. + */ type Colors = { - base: string; - outline: string; + base: HexColor; + outline: HexColor; watch?: { - background: string; + background: HexColor; }; }; +/** + * Colors object for this cursors theme. + * + * @example + * ```typescript + * const themeColors: ThemeColors = { + * White:{ + * base: "#FFFFFF", + * outline: "#000000" + * }, + * }; + * ``` + */ interface ThemeColors { [themeName: string]: Colors; } -interface PixelDiffRate { - [name: string]: { - rate: number; - }; -} - -export { Frames, Colors, ThemeColors, PixelDiffRate }; +export { Frames, Colors, ThemeColors };