Reputation: 1822
<script>
import { Img } from 'flowbite-svelte';
</script>
<Img src={image_url} alt="Listing" class="rounded-lg"/>
How do I define the height of the image? I have tried <Img src={image_url} alt="Listing" size="h-10" class="rounded-lg"/>
but it had no effect.
Upvotes: 2
Views: 1176
Reputation: 4480
Per docs, you can use imgClass
to add styles to Image.
imgClass="h-auto"
<Img src={image_url} alt="Listing" class="rounded-lg" imgClass="h-10"/>
Upvotes: 4
Reputation: 2962
You can use class
attribute :
<Img src={image_url} alt="Listing" class="rounded-lg h-10" />
Upvotes: 0