How to use the ComponentCover #220
-
Hi, I need to block interaction with a component in certain situations. I thought I could do this by wrapping the component in a ComponentCover, but the underlying component is still interactive, and some styles (e.g. button, dashboard item) are showing through the cover (I've applied translucent). I guess the question is - is the above scenario the intended purpose of the Component cover? Could the answer to this question be added to the ui documentation? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @jenniferarnesen, The usage is to render the <div>
<ComponentCover />
<p>Other things in the component that will be covered by the ComponentCover component</p>
</div> The way it works is that the The Does that explain how and why it works the way it does? |
Beta Was this translation helpful? Give feedback.
-
I'm wondering why the If you want to disable the functionality of buttons, etc, wouldn't it be better to add |
Beta Was this translation helpful? Give feedback.
Hi @jenniferarnesen,
The usage is to render the
ComponentCover
inside the component you want to block off:The way it works is that the
ComponentCover
attempts to cover its parent, and not cover its children.The
ComponentCover
accepts children to provide a way to render things on top of the cover, for example, a spinner. So things that are inside the component cover will get a higherz-index
than theComponentCover
itself.Does that explain how and why it works the way it does?