Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export useModalManager and/or add index in useModal #7337

Closed
bertho-zero opened this issue Feb 9, 2023 · 1 comment · Fixed by #7338
Closed

Export useModalManager and/or add index in useModal #7337

bertho-zero opened this issue Feb 9, 2023 · 1 comment · Fixed by #7338
Labels
needs triage Issues and pull requests that need triage attention

Comments

@bertho-zero
Copy link
Contributor

Description

I would need the ModalManager to create custom components that look like modals.

Problem Statement/Justification

I am creating a custom component which is similar to a drawer except that above a certain breakpoint it is displayed directly in the dom (without a drawer).
This is to have a drawer on mobile and the content of the drawer visible on desktop without having to duplicate the elements and thus avoid Flash Of Content.

I would like to use isTopModal from ModalManager to make my component detect as the topmost modal or not.

For that it would be necessary to export useModalManager or that useModal returns the index of the modal.

Proposed Solution or API

useModal could export index, isTopModal or manager.

modalManager and useModalManager could be exported.

Alternatives

No response

Additional Information

No response

@bertho-zero bertho-zero added the needs triage Issues and pull requests that need triage attention label Feb 9, 2023
@mikirejf
Copy link

Bump. It would be nice to have the manager instance exported so we can have an idiomatic way to check the number of opened modals etc ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issues and pull requests that need triage attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants