You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using the Skeleton component, there are scenarios where the structure of the HTML doesn't lend itself to wrapping the 'content' of skeleton in a div. Ex:
In this scenario, the top-level element is rendered as an li, but the inner content of the item is wrapped in a div, which isn't valid HTML. It would be nice to be able to control what element is rendered for the inner wrapper.
Describe the solution you'd like
I would expect there to be an additional prop to provide an element type similar to the as prop:
<ul><Skeletonas="li" contentAs="p">
My content
</Skeleton></ul>
Describe alternatives you've considered
Using classNames is fine for styling the inner wrapper, but to be semantically correct in this scenario, divs aren't valid descendents of an li tag so it would be preferrable to keep the HTML valid, and also reduce the number of tags that need to be rendered.
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When using the Skeleton component, there are scenarios where the structure of the HTML doesn't lend itself to wrapping the 'content' of skeleton in a div. Ex:
In this scenario, the top-level element is rendered as an
li
, but the inner content of the item is wrapped in adiv
, which isn't valid HTML. It would be nice to be able to control what element is rendered for the inner wrapper.Describe the solution you'd like
I would expect there to be an additional prop to provide an element type similar to the
as
prop:Describe alternatives you've considered
Using
classNames
is fine for styling the inner wrapper, but to be semantically correct in this scenario,div
s aren't valid descendents of anli
tag so it would be preferrable to keep the HTML valid, and also reduce the number of tags that need to be rendered.Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: