J
J
J. Snow2021-07-14 16:19:36
React
J. Snow, 2021-07-14 16:19:36

How to make such modal windows?

Hello!
It is necessary to make modal windows with background dimming:
60eee27fabd57740811800.png
When opening a second window, the first one should go under dimming:
60eee2dd01b51572146290.png
But it should also be possible to customize the behavior.
For example, in some cases it is necessary to open a second window without dimming the first one:
60eee34611ce7426217742.png
Or, for example, temporarily hide the first window when opening the second one:
60eee436bb6e2128866039.png
There can be as many such modal windows as you like.

In code, they should be usable in any component, at any level of nesting.

What do you think?))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheSnegok, 2021-07-14
@TheSnegok

Make a setState for each window and, depending on the choice, set the dimming or not and pass each setState through the props up?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question