Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feat/update-custom-props
Browse files Browse the repository at this point in the history
  • Loading branch information
csandman committed Jul 4, 2024
2 parents 70e602e + b40d2f0 commit 5e594ac
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { SystemStyleObject } from "@chakra-ui/system";
import type { GroupBase, StylesConfig, ThemeConfig } from "react-select";

/**
* This is necessary for the module `react-select/base` to be seen by TypeScript.
* Without it the module augmentation will not work properly.
*
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219}
*/
import type { Props } from "react-select/base";
import type {
ChakraStylesConfig,
ColorScheme,
Expand All @@ -18,6 +10,15 @@ import type {
Variant,
} from "./types";

/**
* This is necessary for the module `react-select/base` to be seen by TypeScript.
* Without it the module augmentation will not work properly.
*
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219}
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1766814503}
*/
export type { Props as ReactSelectBaseProps } from "react-select/base";

/**
* Module augmentation is used to add extra props to the existing interfaces
* from `react-select` as per the docs
Expand Down Expand Up @@ -185,34 +186,34 @@ declare module "react-select/base" {

declare module "react-select" {
export interface MultiValueProps<
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>,
Option = unknown,
IsMulti extends boolean = boolean,
Group extends GroupBase<Option> = GroupBase<Option>,
> {
sx: SystemStyleObject;
}

export interface MultiValueGenericProps<
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>,
Option = unknown,
IsMulti extends boolean = boolean,
Group extends GroupBase<Option> = GroupBase<Option>,
> {
sx: SystemStyleObject;
}

export interface MultiValueRemoveProps<
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>,
Option = unknown,
IsMulti extends boolean = boolean,
Group extends GroupBase<Option> = GroupBase<Option>,
> {
isFocused: boolean;
sx: SystemStyleObject;
}

export interface LoadingIndicatorProps<
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>,
Option = unknown,
IsMulti extends boolean = boolean,
Group extends GroupBase<Option> = GroupBase<Option>,
> {
/**
* The color of the filled in area of the spinner.
Expand Down Expand Up @@ -297,7 +298,6 @@ export type {

// Forward all available exports from the original `react-select` package
export * from "react-select";
// export type { Props };
export { useAsync } from "react-select/async";
export { useCreatable } from "react-select/creatable";
export type { AsyncProps } from "react-select/async";
Expand Down

0 comments on commit 5e594ac

Please sign in to comment.