/
text-filter-panel.tsx
58 lines (55 loc) · 1.7 KB
/
text-filter-panel.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { DebouncedTextInput } from '@nrwl/graph/ui-components';
export interface TextFilterPanelProps {
textFilter: string;
resetTextFilter: () => void;
updateTextFilter: (textFilter: string) => void;
toggleIncludeLibsInPathChange: () => void;
includePath: boolean;
}
export function TextFilterPanel({
textFilter,
resetTextFilter,
updateTextFilter,
toggleIncludeLibsInPathChange,
includePath,
}: TextFilterPanelProps) {
return (
<div>
<div className="mt-10 px-4">
<DebouncedTextInput
resetTextFilter={resetTextFilter}
updateTextFilter={updateTextFilter}
initialText={''}
placeholderText={'lib name, other lib name'}
></DebouncedTextInput>
</div>
<div className="mt-4 px-4">
<div className="flex items-start">
<div className="flex h-5 items-center">
<input
disabled={textFilter.length === 0}
id="includeInPath"
name="textFilterCheckbox"
type="checkbox"
value="includeInPath"
className="h-4 w-4 accent-blue-500 dark:accent-sky-500"
checked={includePath}
onChange={toggleIncludeLibsInPathChange}
/>
</div>
<div className="ml-3 text-sm">
<label
htmlFor="includeInPath"
className="cursor-pointer font-medium text-slate-600 dark:text-slate-400"
>
Include related libraries
</label>
<p className="text-slate-400 dark:text-slate-500">
Show libraries that are related to your search.
</p>
</div>
</div>
</div>
</div>
);
}