fix
This commit is contained in:
parent
a6b920d9af
commit
10d472e79e
|
@ -0,0 +1,7 @@
|
||||||
|
.select-compress-model {
|
||||||
|
width: 60%;
|
||||||
|
select {
|
||||||
|
max-width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import { InputRange } from "./input-range";
|
||||||
import { ListItem, Select } from "./ui-lib";
|
import { ListItem, Select } from "./ui-lib";
|
||||||
import { useAllModels } from "../utils/hooks";
|
import { useAllModels } from "../utils/hooks";
|
||||||
import { groupBy } from "lodash-es";
|
import { groupBy } from "lodash-es";
|
||||||
|
import styles from "./model-config.module.scss";
|
||||||
|
|
||||||
export function ModelConfigList(props: {
|
export function ModelConfigList(props: {
|
||||||
modelConfig: ModelConfig;
|
modelConfig: ModelConfig;
|
||||||
|
@ -242,8 +243,7 @@ export function ModelConfigList(props: {
|
||||||
subTitle={Locale.Settings.CompressModel.SubTitle}
|
subTitle={Locale.Settings.CompressModel.SubTitle}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
withiconstyle={{ width: "60%" }}
|
className={styles["select-compress-model"]}
|
||||||
iconselectstyles={{ maxWidth: "100%", whiteSpace: "normal" }}
|
|
||||||
aria-label={Locale.Settings.CompressModel.Title}
|
aria-label={Locale.Settings.CompressModel.Title}
|
||||||
value={compressModelValue}
|
value={compressModelValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
|
@ -294,32 +294,18 @@ export function Select(
|
||||||
props: React.DetailedHTMLProps<
|
props: React.DetailedHTMLProps<
|
||||||
React.SelectHTMLAttributes<HTMLSelectElement> & {
|
React.SelectHTMLAttributes<HTMLSelectElement> & {
|
||||||
align?: "left" | "center";
|
align?: "left" | "center";
|
||||||
withiconstyle?: CSSProperties;
|
|
||||||
iconselectstyles?: CSSProperties;
|
|
||||||
},
|
},
|
||||||
HTMLSelectElement
|
HTMLSelectElement
|
||||||
>,
|
>,
|
||||||
) {
|
) {
|
||||||
const {
|
const { className, children, align, ...otherProps } = props;
|
||||||
className,
|
|
||||||
children,
|
|
||||||
align,
|
|
||||||
withiconstyle,
|
|
||||||
iconselectstyles,
|
|
||||||
...otherProps
|
|
||||||
} = props;
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${styles["select-with-icon"]} ${
|
className={`${styles["select-with-icon"]} ${
|
||||||
align === "left" ? styles["left-align-option"] : ""
|
align === "left" ? styles["left-align-option"] : ""
|
||||||
} ${className}`}
|
} ${className}`}
|
||||||
style={withiconstyle}
|
|
||||||
>
|
|
||||||
<select
|
|
||||||
className={styles["select-with-icon-select"]}
|
|
||||||
style={iconselectstyles}
|
|
||||||
{...otherProps}
|
|
||||||
>
|
>
|
||||||
|
<select className={styles["select-with-icon-select"]} {...otherProps}>
|
||||||
{children}
|
{children}
|
||||||
</select>
|
</select>
|
||||||
<DownIcon className={styles["select-with-icon-icon"]} />
|
<DownIcon className={styles["select-with-icon-icon"]} />
|
||||||
|
|
Loading…
Reference in New Issue