You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ThemedDialog.js 812B

12345678910111213141516171819202122232425262728293031
  1. // @flow
  2. import {
  3. Dialog,
  4. FillScreen,
  5. dialogWidth,
  6. dialogHeight,
  7. PositionerAbsolute,
  8. PositionerRelative
  9. } from '@atlaskit/modal-dialog/dist/es2019/styled/Modal.js';
  10. import { N0, DN50 } from '@atlaskit/theme/colors';
  11. import { themed } from '@atlaskit/theme/components';
  12. import React from 'react';
  13. type Props = {
  14. isChromeless: boolean
  15. }
  16. const ThemedDialog = (props: Props) => {
  17. const style = { backgroundColor: props.isChromeless ? 'transparent' : themed({ light: N0,
  18. dark: DN50 })({ theme: { mode: 'dark' } }) };
  19. return (<Dialog
  20. { ...props }
  21. aria-modal = { true }
  22. style = { style }
  23. theme = {{ mode: 'dark' }} />);
  24. };
  25. export { ThemedDialog as Dialog, FillScreen, dialogWidth, dialogHeight, PositionerAbsolute, PositionerRelative };