Skip to content

Commit 78da8bf

Browse files
committed
fix: update type definitions to use ConditionalValue for color palette props
1 parent 9dc874b commit 78da8bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
22
import type {
33
ColorPalette,
4+
ConditionalValue,
45
SpinnerProps,
56
SystemStyleObject,
67
} from "@chakra-ui/react";
@@ -87,7 +88,7 @@ declare module "react-select/base" {
8788
* @see {@link https://www.chakra-ui.com/docs/components/tag#colors}
8889
* @see {@link https://www.chakra-ui.com/docs/styling/virtual-color}
8990
*/
90-
tagColorPalette?: ColorPalette;
91+
tagColorPalette?: ConditionalValue<ColorPalette | string>;
9192

9293
/**
9394
* The `variant` prop that will be forwarded to your `MultiValue` component
@@ -123,7 +124,7 @@ declare module "react-select/base" {
123124
* @see {@link https://github.com/csandman/chakra-react-select#selectedoptioncolorpalette--default-blue}
124125
* @see {@link https://www.chakra-ui.com/docs/theming/customization/colors}
125126
*/
126-
selectedOptionColorPalette?: ColorPalette;
127+
selectedOptionColorPalette?: ConditionalValue<ColorPalette | string>;
127128

128129
/**
129130
* The color value to style the border of the `Control` with when the
@@ -208,7 +209,7 @@ declare module "react-select" {
208209
*
209210
* @see {@link https://www.chakra-ui.com/docs/components/spinner#colors}
210211
*/
211-
colorPalette?: ColorPalette;
212+
colorPalette?: ConditionalValue<ColorPalette | string>;
212213

213214
/**
214215
* The color of the filled in area of the spinner.

0 commit comments

Comments
 (0)