Skip to content

Commit 2f94e8d

Browse files
Update docs for Custom Select props (#5776)
1 parent b53e647 commit 2f94e8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/pages/typescript/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is disc
9191
You can use module augmentation to add custom props to the \`Select\` prop types:
9292
9393
~~~jsx
94-
declare module 'react-select/dist/declarations/src/Select' {
94+
import type {} from 'react-select/base';
95+
// This import is necessary for module augmentation.
96+
// It allows us to extend the 'Props' interface in the 'react-select/base' module
97+
// and add our custom property 'myCustomProp' to it.
98+
99+
declare module 'react-select/base' {
95100
export interface Props<
96101
Option,
97102
IsMulti extends boolean,

0 commit comments

Comments
 (0)