diff --git a/docs/Tests.tsx b/docs/Tests.tsx index cbbcab70f7..58daf08939 100644 --- a/docs/Tests.tsx +++ b/docs/Tests.tsx @@ -1,8 +1,8 @@ import React, { ChangeEventHandler, - Component, ComponentProps, ComponentType, + useState, } from 'react'; import Select, { MenuPlacement } from 'react-select'; @@ -15,14 +15,6 @@ interface SuiteProps { readonly selectComponent: ComponentType>; readonly idSuffix: string; } -interface SuiteState { - readonly isDisabled: boolean; - readonly isFixed: boolean; - readonly isLoading: boolean; - readonly escapeClearsValue: boolean; - readonly blockScroll: boolean; - readonly portalPlacement: MenuPlacement; -} const AnimatedSelect = (props: ComponentProps) => ( - Disabled - - - - Loading - - + const menuPortalTarget = !isFixed ? document.body : null; -

Grouped

-
- +
+ ({ ...base, zIndex: 999 }), + }} + isDisabled={isDisabled} + isLoading={isLoading} + options={colourOptions} + /> + + + Disabled + + + -
+ Loading + +
+ +

Grouped

+
+ +
-

Clearable

-
- Clearable +
+ + + - - - escapeClearsValue - -
+ escapeClearsValue + +
-

Portalled

-
-
-
{'overflow: hidden; position: absolute;'}
- Portalled +
+
+
{'overflow: hidden; position: absolute;'}
+ + + + + + + Fixed + + + + Portal + + + - - - - - - Fixed - - - - Portal - - - - Block Scroll - -
-
+ Block Scroll +
+
- ); - } -} +
+ ); +}; export default function Tests() { return (