mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: format files with Prettier 3
This commit is contained in:
parent
1dcd09bd98
commit
8e996dc683
391 changed files with 3725 additions and 3785 deletions
|
@ -61,9 +61,9 @@
|
|||
<!-- svelte-ignore a11y-interactive-supports-focus -->
|
||||
<div
|
||||
role="tablist"
|
||||
class:bx--content-switcher="{true}"
|
||||
class:bx--content-switcher--sm="{size === 'sm'}"
|
||||
class:bx--content-switcher--xl="{size === 'xl'}"
|
||||
class:bx--content-switcher={true}
|
||||
class:bx--content-switcher--sm={size === "sm"}
|
||||
class:bx--content-switcher--xl={size === "xl"}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
|
|
|
@ -40,33 +40,33 @@
|
|||
|
||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||
<button
|
||||
bind:this="{ref}"
|
||||
bind:this={ref}
|
||||
type="button"
|
||||
role="tab"
|
||||
tabindex="{selected ? '0' : '-1'}"
|
||||
aria-selected="{selected}"
|
||||
disabled="{disabled}"
|
||||
id="{id}"
|
||||
class:bx--content-switcher-btn="{true}"
|
||||
class:bx--content-switcher--selected="{selected}"
|
||||
tabindex={selected ? "0" : "-1"}
|
||||
aria-selected={selected}
|
||||
{disabled}
|
||||
{id}
|
||||
class:bx--content-switcher-btn={true}
|
||||
class:bx--content-switcher--selected={selected}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:click|preventDefault="{() => {
|
||||
on:click|preventDefault={() => {
|
||||
ctx.update(id);
|
||||
}}"
|
||||
}}
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keydown
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === 'ArrowRight') {
|
||||
on:keydown={({ key }) => {
|
||||
if (key === "ArrowRight") {
|
||||
ctx.change(1);
|
||||
} else if (key === 'ArrowLeft') {
|
||||
} else if (key === "ArrowLeft") {
|
||||
ctx.change(-1);
|
||||
}
|
||||
}}"
|
||||
}}
|
||||
>
|
||||
<span class:bx--content-switcher__label="{true}">
|
||||
<span class:bx--content-switcher__label={true}>
|
||||
<slot>{text}</slot>
|
||||
</span>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue