Source code:
{component.filePath}
Props
{#if component.props.length > 0}
Prop name
Type
Default value
Description
{#each component.props.sort((a, b) => {
if (a.reactive > b.reactive) return -1;
}) as prop (prop.name)}
{#if prop.reactive}
Reactive
{/if}
{#each (prop.type || "").split(" | ") as type, i (type)}
{#if type.startsWith("typeof")}
Carbon Svelte icon
{:else if type.startsWith("HTML")}
{type}
{:else if type in typeMap}
{typeMap[type]}
{:else if type.startsWith("(")}
{type}
{:else}
{/if}
{/each}
{prop.value}
{#if prop.description}
{#each prop.description.split("\n") as line}
{@html line
.replace(/\/g, ">")
.replace(/`(.*?)`/g, "$1
")}.
{/each}
{:else}
No description available.
{/if}
{/each}
{:else}
No props.
{/if}
Typedefs
{#if component.typedefs.length > 0}
{:else}
No typedefs.
{/if}
Slots
{#if component.slots.length > 0}
{#each component.slots as slot (slot.name)}
{slot.default ? "default" : slot.name}
{/each}
{:else}
No slots.
{/if}
Forwarded events
{#if forwarded_events.length > 0}
{#each forwarded_events as event (event.name)}
on:{event.name}
{/each}
{:else}
No forwarded events.
{/if}
Dispatched events
{#if dispatched_events.length > 0}
{#each dispatched_events as event (event.name)}
on:{event.name}
{/each}
{:else}
No dispatched events.
{/if}
$$restProps
{#if component.rest_props}
{component.moduleName}
spreads
$$restProps
to the
{#if component.rest_props.type === "Element"}
{component.rest_props.name}
element.
{:else}{component.rest_props.name}
component.{/if}
{:else}This component does not spread restProps
{/if}