Skip to content

Commit a6b920d

Browse files
committed
fix
1 parent 77f037a commit a6b920d

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

app/components/model-config.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ export function ModelConfigList(props: {
242242
subTitle={Locale.Settings.CompressModel.SubTitle}
243243
>
244244
<Select
245-
style={{ width: "60%" }}
245+
withiconstyle={{ width: "60%" }}
246+
iconselectstyles={{ maxWidth: "100%", whiteSpace: "normal" }}
246247
aria-label={Locale.Settings.CompressModel.Title}
247248
value={compressModelValue}
248249
onChange={(e) => {

app/components/ui-lib.module.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,9 @@
260260

261261
.select-with-icon-select {
262262
height: 100%;
263-
max-width: 100%;
264263
border: var(--border-in-light);
265264
padding: 10px 35px 10px 10px;
266265
border-radius: 10px;
267-
white-space: normal;
268266
appearance: none;
269267
cursor: pointer;
270268
background-color: var(--white);

app/components/ui-lib.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,32 @@ export function Select(
294294
props: React.DetailedHTMLProps<
295295
React.SelectHTMLAttributes<HTMLSelectElement> & {
296296
align?: "left" | "center";
297+
withiconstyle?: CSSProperties;
298+
iconselectstyles?: CSSProperties;
297299
},
298300
HTMLSelectElement
299301
>,
300302
) {
301-
const { className, children, align, style, ...otherProps } = props;
303+
const {
304+
className,
305+
children,
306+
align,
307+
withiconstyle,
308+
iconselectstyles,
309+
...otherProps
310+
} = props;
302311
return (
303312
<div
304313
className={`${styles["select-with-icon"]} ${
305314
align === "left" ? styles["left-align-option"] : ""
306315
} ${className}`}
307-
style={style}
316+
style={withiconstyle}
308317
>
309-
<select className={styles["select-with-icon-select"]} {...otherProps}>
318+
<select
319+
className={styles["select-with-icon-select"]}
320+
style={iconselectstyles}
321+
{...otherProps}
322+
>
310323
{children}
311324
</select>
312325
<DownIcon className={styles["select-with-icon-icon"]} />

0 commit comments

Comments
 (0)