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 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>
|
||||
|
||||
<div
|
||||
|
@ -51,7 +48,7 @@
|
|||
}}
|
||||
{style}>
|
||||
<label
|
||||
class={_labelClass}
|
||||
class={cx('--file-browse-btn', disabled && '--file-browse-btn--disabled')}
|
||||
for={id}
|
||||
on:keydown
|
||||
on:keydown={({ key }) => {
|
||||
|
@ -60,7 +57,9 @@
|
|||
}
|
||||
}}
|
||||
{tabindex}>
|
||||
<div class={_class} {role}>
|
||||
<div
|
||||
class={cx('--file__drop-container', over && '--file__drop-container--drag-over', className)}
|
||||
{role}>
|
||||
{labelText}
|
||||
<input
|
||||
bind:this={inputRef}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue