add color input to popup
This commit is contained in:
@@ -51,7 +51,7 @@ export default function Action({ translator }) {
|
|||||||
|
|
||||||
const popProps = useMemo(() => {
|
const popProps = useMemo(() => {
|
||||||
const width = Math.min(windowSize.w, 300);
|
const width = Math.min(windowSize.w, 300);
|
||||||
const height = Math.min(windowSize.h, 386);
|
const height = Math.min(windowSize.h, 442);
|
||||||
const left = (windowSize.w - width) / 2;
|
const left = (windowSize.w - width) / 2;
|
||||||
const top = (windowSize.h - height) / 2;
|
const top = (windowSize.h - height) / 2;
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -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 (
|
return (
|
||||||
<Box minWidth={300} sx={{ p: 2 }}>
|
<Box minWidth={300} sx={{ p: 2 }}>
|
||||||
@@ -168,6 +168,14 @@ export default function Popup({ setShowPopup, translator: tran }) {
|
|||||||
))}
|
))}
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
|
<TextField
|
||||||
|
size="small"
|
||||||
|
name="bgColor"
|
||||||
|
defaultValue={bgColor}
|
||||||
|
label={i18n("bg_color")}
|
||||||
|
onBlur={handleChange}
|
||||||
|
/>
|
||||||
|
|
||||||
<Button variant="text" onClick={handleOpenSetting}>
|
<Button variant="text" onClick={handleOpenSetting}>
|
||||||
{i18n("setting")}
|
{i18n("setting")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user