mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -67,41 +67,41 @@
|
|||
</script>
|
||||
|
||||
<label
|
||||
aria-disabled={disabled}
|
||||
for={id}
|
||||
tabindex={disabled ? '-1' : tabindex}
|
||||
class:bx--btn={true}
|
||||
class:bx--btn--sm={true}
|
||||
class:bx--btn--disabled={disabled}
|
||||
class={kind && `bx--btn--${kind}`}
|
||||
aria-disabled="{disabled}"
|
||||
for="{id}"
|
||||
tabindex="{disabled ? '-1' : tabindex}"
|
||||
class:bx--btn="{true}"
|
||||
class:bx--btn--sm="{true}"
|
||||
class:bx--btn--disabled="{disabled}"
|
||||
class="{kind && `bx--btn--${kind}`}"
|
||||
on:keydown
|
||||
on:keydown={({ key }) => {
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === ' ' || key === 'Enter') {
|
||||
ref.click();
|
||||
}
|
||||
}}>
|
||||
<span {role}>{labelText}</span>
|
||||
}}">
|
||||
<span role="{role}">{labelText}</span>
|
||||
</label>
|
||||
<input
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
type="file"
|
||||
tabindex="-1"
|
||||
{accept}
|
||||
{disabled}
|
||||
{id}
|
||||
{multiple}
|
||||
{name}
|
||||
class:bx--visually-hidden={true}
|
||||
accept="{accept}"
|
||||
disabled="{disabled}"
|
||||
id="{id}"
|
||||
multiple="{multiple}"
|
||||
name="{name}"
|
||||
class:bx--visually-hidden="{true}"
|
||||
{...$$restProps}
|
||||
on:change|stopPropagation
|
||||
on:change|stopPropagation={({ target }) => {
|
||||
on:change|stopPropagation="{({ target }) => {
|
||||
const files = target.files;
|
||||
const length = files.length;
|
||||
if (files && !disableLabelChanges) {
|
||||
labelText = length > 1 ? `${length} files` : files[0].name;
|
||||
}
|
||||
}}
|
||||
}}"
|
||||
on:click
|
||||
on:click={({ target }) => {
|
||||
on:click="{({ target }) => {
|
||||
target.value = null;
|
||||
}} />
|
||||
}}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue