File tree 2 files changed +36
-1
lines changed
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,49 @@ interface Props {
8
8
title : string
9
9
type : InstructionsType
10
10
children : React . ReactNode
11
+ currentMaiaModel ?: string
12
+ setCurrentMaiaModel ?: ( model : string ) => void
13
+ MAIA_MODELS ?: string [ ]
11
14
}
12
15
13
16
export const GameInfo : React . FC < Props > = ( {
14
17
icon,
15
18
title,
16
19
type,
17
20
children,
21
+ currentMaiaModel,
22
+ setCurrentMaiaModel,
23
+ MAIA_MODELS ,
18
24
} : Props ) => {
19
25
const { setInstructionsModalProps } = useContext ( ModalContext )
26
+
20
27
return (
21
28
< div className = "flex w-full flex-col items-start justify-start gap-1 overflow-hidden bg-background-1 p-3 md:rounded" >
22
29
< div className = "flex w-full items-center justify-between" >
23
30
< div className = "flex items-center justify-start gap-1.5" >
24
31
< span className = "material-symbols-outlined text-xl" > { icon } </ span >
25
32
< h2 className = "text-xl font-semibold" > { title } </ h2 >
33
+ { currentMaiaModel && setCurrentMaiaModel && (
34
+ < p className = "flex items-center gap-1 text-sm md:hidden" >
35
+ using
36
+ < div className = "relative inline-flex items-center gap-0.5" >
37
+ < select
38
+ value = { currentMaiaModel }
39
+ className = "cursor-pointer appearance-none bg-transparent focus:outline-none"
40
+ onChange = { ( e ) => setCurrentMaiaModel ( e . target . value ) }
41
+ >
42
+ { MAIA_MODELS ?. map ( ( model ) => (
43
+ < option value = { model } key = { model } >
44
+ { model . replace ( 'maia_kdd_' , 'Maia ' ) }
45
+ </ option >
46
+ ) ) }
47
+ </ select >
48
+ < span className = "material-symbols-outlined pointer-events-none text-sm" >
49
+ arrow_drop_down
50
+ </ span >
51
+ </ div >
52
+ </ p >
53
+ ) }
26
54
</ div >
27
55
< button
28
56
className = "material-symbols-outlined duration-200 hover:text-human-3"
Original file line number Diff line number Diff line change @@ -583,7 +583,14 @@ const Analysis: React.FC<Props> = ({
583
583
< >
584
584
< div className = "flex h-full flex-1 flex-col justify-center gap-1" >
585
585
< div className = "flex w-full flex-col items-start justify-start gap-1" >
586
- < GameInfo title = "Analysis" icon = "bar_chart" type = "analysis" >
586
+ < GameInfo
587
+ title = "Analysis"
588
+ icon = "bar_chart"
589
+ type = "analysis"
590
+ currentMaiaModel = { currentMaiaModel }
591
+ setCurrentMaiaModel = { setCurrentMaiaModel }
592
+ MAIA_MODELS = { MAIA_MODELS }
593
+ >
587
594
< NestedGameInfo />
588
595
</ GameInfo >
589
596
< div className = "relative flex h-[100vw] w-screen" >
You can’t perform that action at this time.
0 commit comments