2021-11-04 21:10:43 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-01-14 16:12:08 +00:00
|
|
|
import {
|
|
|
|
Dialog,
|
|
|
|
FillScreen,
|
|
|
|
PositionerAbsolute,
|
2022-09-27 07:10:28 +00:00
|
|
|
PositionerRelative,
|
|
|
|
dialogHeight,
|
|
|
|
dialogWidth
|
2021-01-14 16:12:08 +00:00
|
|
|
} from '@atlaskit/modal-dialog/dist/es2019/styled/Modal.js';
|
2022-09-27 07:10:28 +00:00
|
|
|
import { DN50, N0 } from '@atlaskit/theme/colors';
|
2021-01-14 16:12:08 +00:00
|
|
|
import { themed } from '@atlaskit/theme/components';
|
|
|
|
import React from 'react';
|
|
|
|
|
2021-11-04 21:10:43 +00:00
|
|
|
type Props = {
|
|
|
|
isChromeless: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
const ThemedDialog = (props: Props) => {
|
2021-01-14 16:12:08 +00:00
|
|
|
const style = { backgroundColor: props.isChromeless ? 'transparent' : themed({ light: N0,
|
|
|
|
dark: DN50 })({ theme: { mode: 'dark' } }) };
|
|
|
|
|
|
|
|
return (<Dialog
|
|
|
|
{ ...props }
|
|
|
|
aria-modal = { true }
|
|
|
|
style = { style }
|
|
|
|
theme = {{ mode: 'dark' }} />);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export { ThemedDialog as Dialog, FillScreen, dialogWidth, dialogHeight, PositionerAbsolute, PositionerRelative };
|