gradio/js/image/shared/Image.svelte
Yuichiro Tachibana (Tsuchiya) 21cfb0acc3
Remove the styles from the Image/Video primitive components and Fix the container styles (#6726)
* Remove the styles from the Image/Video primitive components and Fix the container styles

* add changeset

* Fix image example size styles

* Remove border from image/Example with type=gallery

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 23:15:02 +01:00

16 lines
447 B
Svelte

<script lang="ts">
import type { HTMLImgAttributes } from "svelte/elements";
type $$Props = HTMLImgAttributes;
import { resolve_wasm_src } from "@gradio/wasm/svelte";
export let src: HTMLImgAttributes["src"] = undefined;
</script>
{#await resolve_wasm_src(src) then resolved_src}
<!-- svelte-ignore a11y-missing-attribute -->
<img src={resolved_src} {...$$restProps} />
{:catch error}
<p style="color: red;">{error.message}</p>
{/await}