Open kurtextrem opened 6 years ago
So i converted it to a div because if someone supplies a placeholder as a div
and then the image loads, so we will toggle from a block element to an inline element, and that may break UI. Hence i thought of wrapping it in a block element div
regardless. If one wants to make the parent an inline then you can add a containerClass prop.@manjula91
display: inline-block
Looks Good
@nitish24p I think we can merge it :)
One comment, and eslint..
can you run npm run eslint to see the lint errors and fix those
Fixed!
But I think it should be added to the readme, because as I said I'd expect an <img>
replacement to be inline too.
I've added an alt attribute, because "Placeholder" and "Worker" as
alt
is not really nice. Second thing I've done is remove the container, because if you're using<ImageWorker>
as replacement for<img>
it should not become a<div>
.