File tree 7 files changed +38
-5
lines changed
apps/frontend/ui/src/navigation
7 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 1
1
import type { JSX } from "react" ;
2
2
3
- import useOptionTraceClasses from "./styles" ;
3
+ import { useComboboxFilter , useId } from "@lib-hooks" ;
4
+ import { Combobox , Flex } from "@lib-components" ;
5
+ import type { TComboboxProps } from "@lib-components" ;
6
+
7
+ import { OptionLayoutTemplate } from "../../templates" ;
8
+ import useClasses from "./styles" ;
4
9
5
10
type TProps = { } ;
6
11
7
12
export default function OptionTrace ( { } : TProps ) : JSX . Element {
8
- const classes = useOptionTraceClasses ( ) ;
9
- return < div className = { classes . root } > OptionTrace</ div > ;
13
+ const classes = useClasses ( ) ;
14
+ return (
15
+ < OptionLayoutTemplate
16
+ header = "Trace a Word"
17
+ subtitle = "Use a word as a anchor and find words that are related to it."
18
+ onClick = { ( ) => { } }
19
+ isLoading = { false }
20
+ disableClick = { false }
21
+ buttonLabel = "Construct trace tree"
22
+ > </ OptionLayoutTemplate >
23
+ ) ;
10
24
}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ type TProps = {
9
9
header : string ;
10
10
onClick : ( ) => void ;
11
11
disableClick ?: boolean ;
12
+ buttonLabel ?: string ;
12
13
isLoading ?: boolean ;
13
14
subtitle ?: string ;
14
15
children ?: ReactNode ;
@@ -17,6 +18,7 @@ type TProps = {
17
18
export default function OptionLayout ( {
18
19
header,
19
20
onClick,
21
+ buttonLabel = "Search" ,
20
22
subtitle = undefined ,
21
23
children = undefined ,
22
24
disableClick = false ,
@@ -31,7 +33,11 @@ export default function OptionLayout({
31
33
</ Flex >
32
34
{ children }
33
35
< Button appearance = "primary" disabled = { disableClick } onClick = { onClick } >
34
- { isLoading ? < Spinner size = "tiny" appearance = "inverted" /> : "Search" }
36
+ { isLoading ? (
37
+ < Spinner size = "tiny" appearance = "inverted" />
38
+ ) : (
39
+ buttonLabel
40
+ ) }
35
41
</ Button >
36
42
</ Flex >
37
43
) ;
Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ export { Button } from "@fluentui/react-components";
5
5
export { MenuList } from "@fluentui/react-components" ;
6
6
export { MenuItemRadio } from "@fluentui/react-components" ;
7
7
export { Spinner } from "@fluentui/react-components" ;
8
+ export { Combobox } from "@fluentui/react-components" ;
8
9
9
10
export { Collapse } from "@fluentui/react-motion-components-preview" ;
10
11
11
12
export { Tooltip } from "@lib-components/atoms" ;
12
13
export { Flex } from "fluentui-helpers" ;
14
+
15
+ export type { ComboboxProps as TComboboxProps } from "@fluentui/react-components" ;
Original file line number Diff line number Diff line change
1
+ extends :
2
+ - " ../../.eslintrc.frontend.yml"
Original file line number Diff line number Diff line change
1
+ export { useComboboxFilter } from "@fluentui/react-components" ;
2
+ export { useId } from "@fluentui/react-components" ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ../../tsconfig.frontend.json" ,
3
+ "include" : [" src" ]
4
+ }
Original file line number Diff line number Diff line change 18
18
"@lib-components" : [" libs/components/src" ],
19
19
"@lib-components/*" : [" libs/components/src/*" ],
20
20
"@lib-theme" : [" libs/theme/src" ],
21
- "@lib-theme/*" : [" libs/theme/src/*" ]
21
+ "@lib-theme/*" : [" libs/theme/src/*" ],
22
+ "@lib-hooks" : [" libs/hooks/src" ],
23
+ "@lib-hooks/*" : [" libs/hooks/src/*" ]
22
24
}
23
25
}
24
26
}
You can’t perform that action at this time.
0 commit comments