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

@ -116,7 +116,8 @@
: $inputValue}"
class:bx--date-picker__input="{true}"
class:bx--date-picker__input--invalid="{invalid}"
class="{size && `bx--date-picker__input--${size}`}"
class:bx--date-picker__input--sm="{size === 'sm'}"
class:bx--date-picker__input--xl="{size === 'xl'}"
on:input
on:input="{({ target }) => {
updateValue({ type: 'input', value: target.value });