mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
chore(file-uploader-drop-container): move class names to markup
This commit is contained in:
parent
3f03a1c259
commit
6a28583a85
1 changed files with 4 additions and 5 deletions
|
@ -21,9 +21,6 @@
|
||||||
|
|
||||||
let over = false;
|
let over = false;
|
||||||
let inputRef = undefined;
|
let inputRef = undefined;
|
||||||
|
|
||||||
$: _class = cx('--file__drop-container', over && '--file__drop-container--drag-over', className);
|
|
||||||
$: _labelClass = cx('--file-browse-btn', disabled && '--file-browse-btn--disabled');
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -51,7 +48,7 @@
|
||||||
}}
|
}}
|
||||||
{style}>
|
{style}>
|
||||||
<label
|
<label
|
||||||
class={_labelClass}
|
class={cx('--file-browse-btn', disabled && '--file-browse-btn--disabled')}
|
||||||
for={id}
|
for={id}
|
||||||
on:keydown
|
on:keydown
|
||||||
on:keydown={({ key }) => {
|
on:keydown={({ key }) => {
|
||||||
|
@ -60,7 +57,9 @@
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
{tabindex}>
|
{tabindex}>
|
||||||
<div class={_class} {role}>
|
<div
|
||||||
|
class={cx('--file__drop-container', over && '--file__drop-container--drag-over', className)}
|
||||||
|
{role}>
|
||||||
{labelText}
|
{labelText}
|
||||||
<input
|
<input
|
||||||
bind:this={inputRef}
|
bind:this={inputRef}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue