refactor: use class directive in TextInput, DatePickerInput (#1426)

Dynamically-formed class names should be avoided for easier static analysis. The Svelte `class:` directive should be used instead.
This commit is contained in:
metonym 2022-08-05 05:21:49 -07:00 committed by GitHub
commit 45f14f160e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -146,7 +146,8 @@
class:bx--visually-hidden="{hideLabel}"
class:bx--label--disabled="{disabled}"
class:bx--label--inline="{inline}"
class="{inline && !!size && `bx--label--inline--${size}`}"
class:bx--label--inline-sm="{inline && size === 'sm'}"
class:bx--label--inline-xl="{inline && size === 'xl'}"
>
<slot name="labelText">
{labelText}