fix(avatar): add missing classes related to the shape prop for the image #159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have found and fixed what I believe to be an issue with the "Avatar" component on both presets that has been bothering me for a while.
The image from the component doesn't update with the "shape" prop like the root container does:
Broken Avatar Image
Fixed Avatar Image
Code
<Avatar image="avatar.png" size="xlarge" shape="circle" :pt="{root: 'p2 bg-red-200!'}" :pt-options="{ mergeProps: true }" />
** Obs.: Padding and red background added to the root element, as an example, to exaggerate the discrepancy with the image.
It seems that the images used in the docs are, conveniently enough, rounded PNGs with transparent backgrounds, hiding this issue. Unless it's by design, but that doesn't seem likely when comparing this behavior with the "Lara" theme in styled-mode, using vanilla CSS.
This is my first time contributing, so, let me know if I this will help and if I should make any changes to adhere to the project's guidelines.
And feel free to add me as a contributor if this ends up helping in any way. This project seems so promising and the community so engaging that I'll be more than happy to contribute with fixes or suggestions as I use it in my projects.