mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 19:01: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
|
@ -136,10 +136,10 @@
|
|||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||
{#if skeleton}
|
||||
<ButtonSkeleton
|
||||
href="{href}"
|
||||
size="{size}"
|
||||
{href}
|
||||
{size}
|
||||
{...$$restProps}
|
||||
style="{hasIconOnly && 'width: 3rem;'}"
|
||||
style={hasIconOnly && "width: 3rem;"}
|
||||
on:click
|
||||
on:focus
|
||||
on:blur
|
||||
|
@ -148,12 +148,12 @@
|
|||
on:mouseleave
|
||||
/>
|
||||
{:else if as}
|
||||
<slot props="{buttonProps}" />
|
||||
<slot props={buttonProps} />
|
||||
{:else if href && !disabled}
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
bind:this={ref}
|
||||
{...buttonProps}
|
||||
on:click
|
||||
on:focus
|
||||
|
@ -163,26 +163,26 @@
|
|||
on:mouseleave
|
||||
>
|
||||
{#if hasIconOnly}
|
||||
<span class:bx--assistive-text="{true}">{iconDescription}</span>
|
||||
<span class:bx--assistive-text={true}>{iconDescription}</span>
|
||||
{/if}
|
||||
<slot />
|
||||
{#if $$slots.icon}
|
||||
<slot
|
||||
name="icon"
|
||||
style="{hasIconOnly ? 'margin-left: 0' : undefined}"
|
||||
style={hasIconOnly ? "margin-left: 0" : undefined}
|
||||
{...iconProps}
|
||||
/>
|
||||
{:else if icon}
|
||||
<svelte:component
|
||||
this="{icon}"
|
||||
style="{hasIconOnly ? 'margin-left: 0' : undefined}"
|
||||
this={icon}
|
||||
style={hasIconOnly ? "margin-left: 0" : undefined}
|
||||
{...iconProps}
|
||||
/>
|
||||
{/if}
|
||||
</a>
|
||||
{:else}
|
||||
<button
|
||||
bind:this="{ref}"
|
||||
bind:this={ref}
|
||||
{...buttonProps}
|
||||
on:click
|
||||
on:focus
|
||||
|
@ -192,19 +192,19 @@
|
|||
on:mouseleave
|
||||
>
|
||||
{#if hasIconOnly}
|
||||
<span class:bx--assistive-text="{true}">{iconDescription}</span>
|
||||
<span class:bx--assistive-text={true}>{iconDescription}</span>
|
||||
{/if}
|
||||
<slot />
|
||||
{#if $$slots.icon}
|
||||
<slot
|
||||
name="icon"
|
||||
style="{hasIconOnly ? 'margin-left: 0' : undefined}"
|
||||
style={hasIconOnly ? "margin-left: 0" : undefined}
|
||||
{...iconProps}
|
||||
/>
|
||||
{:else if icon}
|
||||
<svelte:component
|
||||
this="{icon}"
|
||||
style="{hasIconOnly ? 'margin-left: 0' : undefined}"
|
||||
this={icon}
|
||||
style={hasIconOnly ? "margin-left: 0" : undefined}
|
||||
{...iconProps}
|
||||
/>
|
||||
{/if}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
</script>
|
||||
|
||||
<div
|
||||
class:bx--btn-set="{true}"
|
||||
class:bx--btn-set--stacked="{stacked}"
|
||||
class:bx--btn-set={true}
|
||||
class:bx--btn-set--stacked={stacked}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||
{#if href}
|
||||
<a
|
||||
href="{href}"
|
||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||
{href}
|
||||
rel={$$restProps.target === "_blank" ? "noopener noreferrer" : undefined}
|
||||
role="button"
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--btn="{true}"
|
||||
class:bx--btn--field="{size === 'field'}"
|
||||
class:bx--btn--sm="{size === 'small'}"
|
||||
class:bx--btn--lg="{size === 'lg'}"
|
||||
class:bx--btn--xl="{size === 'xl'}"
|
||||
class:bx--skeleton={true}
|
||||
class:bx--btn={true}
|
||||
class:bx--btn--field={size === "field"}
|
||||
class:bx--btn--sm={size === "small"}
|
||||
class:bx--btn--lg={size === "lg"}
|
||||
class:bx--btn--xl={size === "xl"}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:focus
|
||||
|
@ -37,12 +37,12 @@
|
|||
{:else}
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--btn="{true}"
|
||||
class:bx--btn--field="{size === 'field'}"
|
||||
class:bx--btn--sm="{size === 'small'}"
|
||||
class:bx--btn--lg="{size === 'lg'}"
|
||||
class:bx--btn--xl="{size === 'xl'}"
|
||||
class:bx--skeleton={true}
|
||||
class:bx--btn={true}
|
||||
class:bx--btn--field={size === "field"}
|
||||
class:bx--btn--sm={size === "small"}
|
||||
class:bx--btn--lg={size === "lg"}
|
||||
class:bx--btn--xl={size === "xl"}
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:focus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue