hide color input when diy style

This commit is contained in:
Gabe Yuan
2023-09-01 17:02:47 +08:00
parent 3d656cf5b0
commit 6327391e65

View File

@@ -18,6 +18,7 @@ import {
OPT_LANGS_FROM, OPT_LANGS_FROM,
OPT_LANGS_TO, OPT_LANGS_TO,
OPT_STYLE_ALL, OPT_STYLE_ALL,
OPT_STYLE_USE_COLOR,
} from "../../config"; } from "../../config";
import { sendIframeMsg } from "../../libs/iframe"; import { sendIframeMsg } from "../../libs/iframe";
@@ -172,13 +173,15 @@ export default function Popup({ setShowPopup, translator: tran }) {
))} ))}
</TextField> </TextField>
<TextField {OPT_STYLE_USE_COLOR.includes(textStyle) && (
size="small" <TextField
name="bgColor" size="small"
value={bgColor} name="bgColor"
label={i18n("bg_color")} value={bgColor}
onChange={handleChange} label={i18n("bg_color")}
/> onChange={handleChange}
/>
)}
<Button variant="text" onClick={handleOpenSetting}> <Button variant="text" onClick={handleOpenSetting}>
{i18n("setting")} {i18n("setting")}