Fix: ScaledImage styling
tichnas opened this issue · comments
Describe the bug
There is a ScaledImage
component which is used to render images. It doesn't take any style prop, but it's expected when used to create ImageContent
and ImageTextSection
components. This results in expected styles like padding ignored.
To Reproduce
Steps to reproduce the behavior:
- Go to the homepage
- Scroll down to a section with image on right
- Observe that there is no (expected) space between the text and the image.
Expected behavior
Either the ScaledImage
component should take and handle style
prop or the styling should be explicitly added to its parent.
Screenshots
@tichnas I would like to work on this issue.
@nlok5923 I think you'll have to wait till a maintainer accepts this issue and assigns it to you. Sorry for the delay.
its a v small issue so i think it will be better if you assign a newcomer to it
. or if you wan to work i can assign anyone
@tichnas
i can work over it. @nandini45 & @tichnas
Sorry @prabhat04011998, since @nlok5923 asked first, he should be given a chance.
So @nlok5923, start working on the issue and you'll get assigned soon, just let us know (by a comment) that you're working on it.
Thanks @tichnas i am working on it.
@nlok5923 if the time limit to do the work exceed 3 days
do give us update. happy coding
Sure @nandini45 😊
@tichnas i think this issue has been resolved previously as there is enough padding between the image and text .
do i still need to add some more padding?
@nlok5923 The padding observed in your screenshot is of Content
component which is only on left. This means that the cases where the image is on right, there will be no padding in between.
Now, observe the ImageContent
component. It returns a View
containing another View
and a ScaledImage
. The ScaledImage
component is expected to have a left and right padding of 16 (line 59 and 60).
So, what you need to do is wrap the ScaledImage
inside another view (everywhere it's used), and give it the required styling.
Maybe my explanation is not up to the mark, so just let me know if you've any more doubts...
Thanks @tichnas for clearing mine doubt 😄.