mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[@types/react-color] Fix wrong color type on swatch hover (#33984)
* Fix wrong type on swatch hover * Change variable name for consistency * Add user as definitions author * Change major version due to breaking changes
This commit is contained in:
committed by
Sheetal Nandi
parent
a4e52c5eb1
commit
30468b4db1
Vendored
+3
-2
@@ -1,10 +1,11 @@
|
||||
// Type definitions for react-color 2.17
|
||||
// Type definitions for react-color 3.0
|
||||
// Project: https://github.com/casesandberg/react-color/, http://casesandberg.github.io/react-color
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>,
|
||||
// Marks Polakovs <https://github.com/markspolakovs>,
|
||||
// Matthieu Montaudouin <https://github.com/mntdn>,
|
||||
// Nokogiri <https://github.com/nkgrnkgr>,
|
||||
// 0815Strohhut <https://github.com/0815Strohhut>
|
||||
// 0815Strohhut <https://github.com/0815Strohhut>,
|
||||
// Daniel Fürst <https://github.com/dnlfrst>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface BlockPickerProps extends ColorPickerProps<BlockPicker> {
|
||||
colors?: string[];
|
||||
width?: string;
|
||||
triangle?: 'hide' | 'top';
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class BlockPicker extends Component<BlockPickerProps> {}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export interface CirclePickerProps extends ColorPickerProps<CirclePicker> {
|
||||
width?: string;
|
||||
circleSize?: number;
|
||||
circleSpacing?: number;
|
||||
onSwatchHover?(colorResult: ColorResult, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class CirclePicker extends Component<CirclePickerProps> {}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface CompactPickerProps extends ColorPickerProps<CompactPicker> {
|
||||
colors?: string[];
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class CompactPicker extends Component<CompactPickerProps> {}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface GithubPickerProps extends ColorPickerProps<GithubPicker> {
|
||||
colors?: string[];
|
||||
width?: string;
|
||||
triangle?: 'hide' | 'top-left' | 'top-right';
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class GithubPicker extends Component<GithubPickerProps> {}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface SketchPickerProps extends ColorPickerProps<SketchPicker> {
|
||||
disableAlpha?: boolean;
|
||||
presetColors?: string[];
|
||||
width?: string;
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class SketchPicker extends Component<SketchPickerProps> {}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface SwatchesPickerProps extends ColorPickerProps<SwatchesPicker> {
|
||||
colors?: string[][];
|
||||
height?: number;
|
||||
width?: number;
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class SwatchesPicker extends Component<SwatchesPickerProps> {}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { Component } from "react";
|
||||
import { ColorPickerProps, Color } from "../../..";
|
||||
import { ColorPickerProps, ColorResult } from "../../..";
|
||||
|
||||
export interface TwitterPickerProps extends ColorPickerProps<TwitterPicker> {
|
||||
colors?: string[];
|
||||
width?: string;
|
||||
triangle?: 'hide' | 'top-left' | 'top-right';
|
||||
onSwatchHover?(color: Color, event: MouseEvent): void;
|
||||
onSwatchHover?(color: ColorResult, event: MouseEvent): void;
|
||||
}
|
||||
|
||||
export default class TwitterPicker extends Component<TwitterPickerProps> {}
|
||||
|
||||
Reference in New Issue
Block a user