Bug fix: passed darkmode prop to Modal (#912)

This commit is contained in:
Akshit Arora 2021-10-07 08:44:47 +05:30 committed by GitHub
parent 177782c955
commit 3f22edb977
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ import { SubContainer } from '../SubContainer';
import { ConfigHandle } from '../ConfigHandle';
import { resolveWidgetFieldValue } from '../../_helpers/utils';
export const Modal = function Modal({ id, component, height, containerProps, currentState }) {
export const Modal = function Modal({ id, component, height, containerProps, currentState, darkMode }) {
const [show, showModal] = useState(false);
const parentRef = useRef(null);
@ -52,7 +52,7 @@ export const Modal = function Modal({ id, component, height, containerProps, cur
<BootstrapModal.Header>
<BootstrapModal.Title>{title}</BootstrapModal.Title>
<div>
<Button variant="light" size="sm" onClick={hideModal}>
<Button variant={darkMode ? 'secondary' : 'light'} size="sm" onClick={hideModal}>
x
</Button>
</div>