DocSpace-client/packages/shared/components/modal-dialog
2024-01-22 17:00:59 +03:00
..
sub-components Shared:Components:ModalDialog: fix container render 2024-01-22 17:00:59 +03:00
index.tsx Shared:Components:ModalDialog: rewrite to typescript 2023-12-11 14:23:01 +03:00
ModalDialog.constants.ts Shared:Components:ModalDialog: rewrite to typescript 2023-12-11 14:23:01 +03:00
ModalDialog.enums.ts Shared:Components:ModalDialog: rewrite to typescript 2023-12-11 14:23:01 +03:00
ModalDialog.stories.tsx Shared:Components: fix storybook 2023-12-29 11:31:26 +03:00
ModalDialog.styled.ts Shared:Components:ModalDialog: fix errors 2023-12-13 18:44:59 +03:00
ModalDialog.tsx Shared:Components: fix storybook build 2024-01-10 15:54:04 +03:00
ModalDialog.types.ts Shared:Components:ModalDialog: fix errors 2023-12-13 18:44:59 +03:00
ModalDialog.utils.tsx Client: fix after rewrite to typescript 2023-12-27 18:13:56 +03:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

ModalDialog

ModalDialog is used for displaying modal dialogs

Usage

import { ModalDialog } from "@docspace/shared/components/modal-dialog";
<ModalDialog visible={false} scale={false} displayType="auto" zIndex={310}>
  <ModalDialog.Header>"Change password"</ModalDialog.Header>
  <ModalDialog.Body>
    <div>
      Send the password change instruction to the{" "}
      <a href="mailto:asc@story.book">asc@story.book</a> email address
    </div>
  </ModalDialog.Body>
  <ModalDialog.Footer>
    <Button
      label="Send"
      size="big"
      primary={true}
      onClick={() => alert("It's works!")}
    />
  </ModalDialog.Footer>
</ModalDialog>

Properties

Props Type Required Values Default Description
visible bool - - - Display dialog or not
displayType oneOf - auto, modal, aside auto Display type
scale bool - - - Indicates the side panel has scale
onClose func - - - Will be triggered when a close button is clicked
zIndex number - - 310 CSS z-index
modalBodyPadding string - - 16px 0 CSS padding props for modal body section
asideBodyPadding string - - 16px 0 CSS padding props for aside body section