fix(1684): hide helper text container in password input when not used

This commit is contained in:
Gabriel Lee 2023-03-11 17:10:50 +00:00
commit 6ce0ed4b51
2 changed files with 5 additions and 1 deletions

View file

@ -50,3 +50,7 @@ Set prop `type` to `"text"` to toggle password visibility.
## Disabled state
<PasswordInput disabled labelText="Password" placeholder="Enter password..." />
## With helper text
<PasswordInput helperText="Your password should be hard to guess" labelText="Password" placeholder="Enter password..." />

View file

@ -248,7 +248,7 @@
{invalidText}
</div>
{/if}
{#if !invalid && !warn && !isFluid && !inline}
{#if !invalid && !warn && !isFluid && !inline && helperText}
<div
class:bx--form__helper-text="{true}"
class:bx--form__helper-text--disabled="{disabled}"