diff --git a/types/react-color/index.d.ts b/types/react-color/index.d.ts index 25664870c8..9935814feb 100644 --- a/types/react-color/index.d.ts +++ b/types/react-color/index.d.ts @@ -1,6 +1,10 @@ -// Type definitions for react-color 2.14 +// Type definitions for react-color 2.17 // Project: https://github.com/casesandberg/react-color/, http://casesandberg.github.io/react-color -// Definitions by: Karol Janyst , Marks Polakovs , Matthieu Montaudouin , Nokogiri +// Definitions by: Karol Janyst , +// Marks Polakovs , +// Matthieu Montaudouin , +// Nokogiri , +// 0815Strohhut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/react-color/lib/components/chrome/Chrome.d.ts b/types/react-color/lib/components/chrome/Chrome.d.ts index a078cb231e..3c8f4139a5 100644 --- a/types/react-color/lib/components/chrome/Chrome.d.ts +++ b/types/react-color/lib/components/chrome/Chrome.d.ts @@ -1,8 +1,37 @@ -import { Component } from "react"; +import { Component, CSSProperties } from "react"; import { ColorPickerProps } from "../../.."; +export interface ChromePickerDefaultStyles { + picker?: CSSProperties; + saturation?: CSSProperties; + Saturation?: CSSProperties; + body?: CSSProperties; + controls?: CSSProperties; + color?: CSSProperties; + swatch?: CSSProperties; + active?: CSSProperties; + toggles?: CSSProperties; + hue?: CSSProperties; + Hue?: CSSProperties; + alpha?: CSSProperties; + Alpha?: CSSProperties; +} + +export interface ChromePickerDisableAlphaStyles { + color?: CSSProperties; + alpha?: CSSProperties; + hue?: CSSProperties; + swatch?: CSSProperties; +} + +export interface ChromePickerStyles { + default?: ChromePickerDefaultStyles; + disableAlpha?: ChromePickerDisableAlphaStyles; +} + export interface ChromePickerProps extends ColorPickerProps { disableAlpha?: boolean; + styles?: ChromePickerStyles; } export default class ChromePicker extends Component {} diff --git a/types/react-color/react-color-tests.tsx b/types/react-color/react-color-tests.tsx index 71ed800375..631fb34839 100644 --- a/types/react-color/react-color-tests.tsx +++ b/types/react-color/react-color-tests.tsx @@ -35,7 +35,7 @@ const colors = ["#000", "#333"]; render(, document.getElementById("main")); render(, document.getElementById("main")); -render(, document.getElementById("main")); +render(, document.getElementById("main")); render(, document.getElementById("main")); render(, document.getElementById("main")); render(, document.getElementById("main"));