-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10409: WIP trying to type selectsearch
- Loading branch information
Zachary Rogers
committed
Sep 23, 2024
1 parent
c1a68df
commit 7e4f101
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import ReactSelect, { GroupBase, Props } from 'react-select'; | ||
import classNames from 'classnames'; | ||
|
||
export function SelectSearch2< | ||
Option, | ||
IsMulti extends boolean = false, | ||
Group extends GroupBase<Option> = GroupBase<Option>, | ||
>(props: Props<Option, IsMulti, Group>) { | ||
return ( | ||
<div data-testid={props['data-testid']}> | ||
<ReactSelect | ||
{...props} | ||
className={classNames('select-react-element', props.className)} | ||
classNamePrefix={'select-react-element'} | ||
placeholder={props.placeholder || '- Select -'} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
SelectSearch2.displayName = 'SelectSearch2'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters