Skip to content

Conversation

kwangminini
Copy link
Contributor

The reason why Skeleton width becomes 0 when the display of the parent element is flex, and a solution have been added to the README Example.

If the explanation is not enough, please give feedback.
Thanks😀

@srmagura
Copy link
Collaborator

Hey @kwangminini, thanks for this. I am having some trouble understanding the section you added to the README, and I think there might be some technical inaccuracies in it. Instead of talking about percent widths, I would say that the <Skeleton> has no intrinsic width, so, by default, it will have a width of 0 when used as a child of a flex container.

@kwangminini
Copy link
Contributor Author

@srmagura Ok, I got it.😃
I fixed it, can you check it?

@srmagura
Copy link
Collaborator

Thank you. I also made some further improvements.

By the way, I recommend installing the Prettier VS Code extension so that your code is automatically formatted when you save. In the react-loading-skeleton repository, we also have Prettier set up in a pre-commit hook which you can opt in to by running yarn setup.

@srmagura srmagura merged commit 083c05d into dvtng:master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants