chore: format files with Prettier 3

This commit is contained in:
Eric Liu 2024-11-11 21:27:04 -08:00
commit 8e996dc683
391 changed files with 3725 additions and 3785 deletions

View file

@ -32,16 +32,16 @@
$: source = `https://github.com/carbon-design-system/carbon-components-svelte/tree/master/${component.filePath}`;
$: forwarded_events = component.events.filter(
(event) => event.type === "forwarded"
(event) => event.type === "forwarded",
);
$: dispatched_events = component.events.filter(
(event) => event.type === "dispatched"
(event) => event.type === "dispatched",
);
</script>
<p style="margin-bottom: var(--cds-layout-02)">
Source code:
<OutboundLink size="lg" inline href="{source}">
<OutboundLink size="lg" inline href={source}>
{component.filePath}
</OutboundLink>
</p>
@ -65,7 +65,7 @@
}) as prop (prop.name)}
<StructuredListRow>
<StructuredListCell noWrap>
<InlineSnippet code="{prop.name}" />
<InlineSnippet code={prop.name} />
{#if prop.reactive}
<div
style="white-space: nowrap; margin-top: var(--cds-spacing-03); margin-bottom: var(--cds-spacing-{prop.isRequired
@ -99,7 +99,7 @@
{:else if type.startsWith("(")}
<code class="code-01">{type}</code>
{:else}
<InlineSnippet code="{type}" />
<InlineSnippet code={type} />
{/if}
</div>
{/each}

View file

@ -6,7 +6,7 @@
</script>
<div>
<CodeSnippet code="{code}" type="inline" copy="{(text) => copy(text)}" />
<CodeSnippet {code} type="inline" copy={(text) => copy(text)} />
</div>
<style>

View file

@ -26,8 +26,8 @@
kind="ghost"
target="_blank"
size="field"
href="{themedSrcUrl}"
icon="{Launch}"
href={themedSrcUrl}
icon={Launch}
>
Open in new tab
</Button>
@ -35,13 +35,13 @@
{/if}
<div class="preview-viewer" class:framed>
{#if framed}
<iframe title="{src.split('/').pop()}" src="{themedSrcUrl}"></iframe>
<iframe title={src.split("/").pop()} src={themedSrcUrl}></iframe>
{:else}
<slot />
{/if}
</div>
<div class="code-override">
<CodeSnippet type="multi" code="{codeRaw}" copy="{(text) => copy(text)}">
<CodeSnippet type="multi" code={codeRaw} copy={(text) => copy(text)}>
{@html code}
</CodeSnippet>
</div>

View file

@ -15,8 +15,8 @@
<div class="card-wrapper" class:borderRight class:borderBottom>
<AspectRatio>
<svelte:component
this="{tileComponent}"
href="{href}"
this={tileComponent}
{href}
{...$$restProps}
style="height: 100%;"
>
@ -29,11 +29,11 @@
</div>
<div class="card-footer">
<svelte:component
this="{LogoGithub}"
size="{32}"
this={LogoGithub}
size={32}
style="fill: var(--cds-icon-01)"
/>
<Launch size="{20}" style="fill: var(--cds-icon-01)" />
<Launch size={20} style="fill: var(--cds-icon-01)" />
</div>
</div>
</svelte:component>