Open guxuerui opened 1 year ago
You might need to recreate the style object to have its reference change when modalBg
changes. E.g.:
$: styleWindow = { width: "80%", backgroundColor: modalBg };
and assign styleWindow
to the modal's styleWindow
: <Modal styleWindow={styleWindow}>...</Modal>
You might need to recreate the style object to have its reference change when
modalBg
changes. E.g.:$: styleWindow = { width: "80%", backgroundColor: modalBg };
and assign
styleWindow
to the modal'sstyleWindow
:<Modal styleWindow={styleWindow}>...</Modal>
OK,thanks for your reply~ I will try this again.
When I try to make the
modal
background color change with the theme color, it always fails to update in real-time unless I refresh the page. What should I do?My code:
Can anyone provide me with some assistance? Thank you very much.