mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
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:
parent
d2cc75d883
commit
45f14f160e
2 changed files with 4 additions and 2 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue