Skip to content

Commit 5a4868f

Browse files
committed
update alg picker container
1 parent dba55a9 commit 5a4868f

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

src/features/debugger/components/debugger-alg-picker/debugger-alg-picker.component.tsx

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
algDictionary,
1616
jwsExampleAlgHeaderParameterValuesDictionary,
1717
} from "@/features/common/values/jws-alg-header-parameter-values.dictionary";
18-
import { useButton } from "@react-aria/button"
18+
import { useButton } from "@react-aria/button";
1919
import { DebuggerPickerOptionModel } from "@/features/common/models/debugger-picker-option.model";
2020

2121
enum PickerStates {
@@ -92,7 +92,6 @@ export const WidgetAlgPickerComponent: React.FC<
9292
setPickerState(PickerStates.IDLE);
9393
};
9494

95-
9695
useEffect(() => {
9796
(async function runEs512Check() {
9897
setCanUseEs512(await isP521Supported());
@@ -107,18 +106,6 @@ export const WidgetAlgPickerComponent: React.FC<
107106
})();
108107
}, []);
109108

110-
/* const noneAlgOptions: DebuggerPickerOptionModel[] = useMemo(() => {
111-
return Object.entries(
112-
jwsExampleAlgHeaderParameterValuesDictionary.unsecured
113-
).map((entry) => {
114-
const [key, value] = entry;
115-
116-
return {
117-
value: key,
118-
label: value.name,
119-
};
120-
});
121-
}, []); */
122109

123110
const symmetricAlgOptions: DebuggerPickerOptionModel[] = useMemo(() => {
124111
return Object.entries(jwsExampleAlgHeaderParameterValuesDictionary.mac).map(
@@ -197,16 +184,17 @@ export const WidgetAlgPickerComponent: React.FC<
197184
{dictionary.exampleAlgPicker.label}
198185
</label>
199186
</div>
200-
<DebuggerPickerComponent
201-
label={null}
202-
data-has-label={label !== null}
203-
languageCode={languageCode}
204-
handleSelection={selectExample}
205-
selectedOptionCode={null}
206-
options={algOptions}
207-
placeholder={dictionary.exampleAlgPicker.defaultValue}
208-
minWidth={null}
209-
/>
187+
<div className={styles.picker__container}>
188+
<DebuggerPickerComponent
189+
label={null}
190+
data-has-label={label !== null}
191+
languageCode={languageCode}
192+
handleSelection={selectExample}
193+
options={algOptions}
194+
placeholder={dictionary.exampleAlgPicker.defaultValue}
195+
minWidth={null}
196+
/>
197+
</div>
210198
</div>
211199
</div>
212200
</div>

src/features/debugger/components/debugger-alg-picker/debugger-alg-picker.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
font-weight: 600;
6363
}
6464

65+
.picker__container {
66+
height: 2rem;
67+
}
68+
6569
.button {
6670
color: var(--color_fg_on_button);
6771
background-color: var(--color_bg_button);

0 commit comments

Comments
 (0)