Skip to content

feat: Add display mode options to modal#25

Open
RicoClark wants to merge 2 commits intomasterfrom
feat/modal-display-modes
Open

feat: Add display mode options to modal#25
RicoClark wants to merge 2 commits intomasterfrom
feat/modal-display-modes

Conversation

@RicoClark
Copy link
Member

This commit introduces a new feature that allows you to change the display mode of the modal component.

A 3-dots menu has been added to the modal header, providing the following options:

  • Default: The standard centered modal.
  • Drawer: A sidebar that slides in from the right.
  • Fullscreen: A mode that fills a specified container element.

Your selected display mode is persisted in localStorage.

The ModalProvider has been updated to accept a containerRef prop to support the fullscreen mode within a specific container.

This commit introduces a new feature that allows you to change the display mode of the modal component.

A 3-dots menu has been added to the modal header, providing the following options:
- Default: The standard centered modal.
- Drawer: A sidebar that slides in from the right.
- Fullscreen: A mode that fills a specified container element.

Your selected display mode is persisted in `localStorage`.

The `ModalProvider` has been updated to accept a `containerRef` prop to support the fullscreen mode within a specific container.
The previous build process did not include the `modal.css` file in the published package, causing a runtime error in consuming projects.

This commit updates the `build` script in `package.json` to copy the `modal.css` file to the `lib` directory after compilation. This ensures that the CSS file is included in the published package and can be resolved at runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant