@@ -72,54 +72,37 @@ const EligibilityCheckListView = ({
7272 return (
7373 < >
7474 < div class = "p-4" >
75- < div class = "flex items-center mb-2" >
75+ < div class = "flex justify-between items-center mb-2" >
7676 < div class = "text-2xl font-bold" > { activeCheckConfig ( ) . title } </ div >
7777 < div class = "grid w-full grid-cols-2 items-center justify-center rounded-md bg-muted bg-gray-100 p-1 text-gray-500 mb-2 w-xs" >
78- < button
79- onClick = { ( ) => setActiveTab ( "account" ) }
80- class = { `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded ${
81- activeTab ( ) === "account"
82- ? "bg-white text-gray-950 shadow-sm"
83- : "hover:bg-gray-200"
84- } `}
85- >
86- Public Checks
87- </ button >
88- < button
89- onClick = { ( ) => setActiveTab ( "password" ) }
90- class = { `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded ${
91- activeTab ( ) === "password"
92- ? "bg-white text-gray-950 shadow-sm"
93- : "hover:bg-gray-200"
94- } `}
95- >
96- Custom Checks
97- </ button >
98- </ div >
99-
100- < div class = "ml-auto flex gap-2" >
101- < div class = "border-b border-gray-200" >
102- < nav class = "-mb-px flex space-x-4" aria-label = "Tabs" >
103-
104- </ nav >
105- </ div >
106- < For
107- each = {
108- [ PublicCheckConfig , UserDefinedCheckConfig ] as CheckModeConfig [ ]
78+ < button
79+ onClick = { ( ) =>
80+ mode ( ) === "public"
81+ ? setMode ( "user-defined" )
82+ : setMode ( "public" )
83+ }
84+ class = { `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded ${
85+ mode ( ) === "public"
86+ ? "bg-white text-gray-950 shadow-sm"
87+ : "hover:bg-gray-200"
88+ } `}
89+ >
90+ Public Checks
91+ </ button >
92+ < button
93+ onClick = { ( ) =>
94+ mode ( ) === "public"
95+ ? setMode ( "user-defined" )
96+ : setMode ( "public" )
10997 }
98+ class = { `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded ${
99+ mode ( ) === "user-defined"
100+ ? "bg-white text-gray-950 shadow-sm"
101+ : "hover:bg-gray-200"
102+ } `}
110103 >
111- { ( modeOption ) => (
112- < button
113- class = { `btn-default ${
114- mode ( ) === modeOption . mode ? "btn-blue" : "btn-gray"
115- } `}
116- onClick = { ( ) => setMode ( modeOption . mode ) }
117- title = { modeOption . buttonTitle }
118- >
119- { modeOption . buttonTitle }
120- </ button >
121- ) }
122- </ For >
104+ Custom Checks
105+ </ button >
123106 </ div >
124107 </ div >
125108 < div > { activeCheckConfig ( ) . description } </ div >
0 commit comments