mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Currently, dispatched events without `e.detail` have a type of `any`. We can be more specific as a `CustomEvent` detail value is `null`.
22 lines
355 B
Svelte
22 lines
355 B
Svelte
<script lang="ts">
|
|
import { ImageLoader } from "../types";
|
|
|
|
let loading = false;
|
|
let loaded = false;
|
|
let error = false;
|
|
</script>
|
|
|
|
<ImageLoader
|
|
bind:loading
|
|
bind:loaded
|
|
bind:error
|
|
fadeIn
|
|
ratio="16x9"
|
|
src=""
|
|
on:load="{(e) => {
|
|
console.log(e.detail); // null
|
|
}}"
|
|
on:error="{(e) => {
|
|
console.log(e.detail); // null
|
|
}}"
|
|
/>
|