add color input to popup

This commit is contained in:
Gabe Yuan
2023-08-09 22:58:03 +08:00
parent 7a84933107
commit 077713cd64
2 changed files with 10 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ export default function Popup({ setShowPopup, translator: tran }) {
);
}
const { transOpen, translator, fromLang, toLang, textStyle } = rule;
const { transOpen, translator, fromLang, toLang, textStyle, bgColor } = rule;
return (
<Box minWidth={300} sx={{ p: 2 }}>
@@ -168,6 +168,14 @@ export default function Popup({ setShowPopup, translator: tran }) {
))}
</TextField>
<TextField
size="small"
name="bgColor"
defaultValue={bgColor}
label={i18n("bg_color")}
onBlur={handleChange}
/>
<Button variant="text" onClick={handleOpenSetting}>
{i18n("setting")}
</Button>