Enable setting the cursor via CSS on the components (loading) #136
Replies: 3 comments 1 reply
-
This is possible with CSS, e.g. wa-card {
cursor: not-allowed;
} https://codepen.io/claviska/pen/gbYewNy?editors=0100 Note that any child elements you have inside the element might need a similar style. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. I did notice that it works on some components like the While the |
Beta Was this translation helpful? Give feedback.
-
For the moment I helped myself using the parts selector to achieve what I'm trying to do. Something like this:
|
Beta Was this translation helpful? Give feedback.
-
My use case goes like this:
I have a filter box containing wa-selects and wa-radio buttons. When an option changes, it triggers loading of data in the background. While data is loading I want to display a loading cursor on the element. Actually the same cursor behaviour the button has when the
loading
attribute is set.I think it does not make sense to add and implement a
loading
attribute to each component. But enabling to set the CSS value for the cursor for the shadow dom would be easy, make sense for this use case and already be sufficient. As far as I understand, this could be achieved from the stylesheet within the component:This should allow to set the cursor CSS property because it is not private anymore. I cannot say whether this is sufficient for for setting the cursor also for the deeper nested elements of the component. Maybe it this has to be applied for each part of the component.
Beta Was this translation helpful? Give feedback.
All reactions