diff --git a/src/components/TextInput/PasswordInput.svelte b/src/components/TextInput/PasswordInput.svelte index d6b76eb3..ac98245b 100644 --- a/src/components/TextInput/PasswordInput.svelte +++ b/src/components/TextInput/PasswordInput.svelte @@ -16,17 +16,14 @@ export let tooltipAlignment = 'center'; export let hidePasswordLabel = 'Hide password'; export let showPasswordLabel = 'Show password'; - export let props = {}; + export let style = undefined; - import { createEventDispatcher } from 'svelte'; import WarningFilled16 from 'carbon-icons-svelte/lib/WarningFilled16'; import View16 from 'carbon-icons-svelte/lib/View16'; import ViewOff16 from 'carbon-icons-svelte/lib/ViewOff16'; import { cx } from '../../lib'; - const dispatch = createEventDispatcher(); const errorId = `${id}-error`; - const passwordIsVisible = type === 'text'; const _labelClass = cx( '--label', hideLabel && '--visually-hidden', @@ -48,13 +45,14 @@ tooltipPosition && `--tooltip--${tooltipPosition}`, tooltipAlignment && `--tooltip--align-${tooltipAlignment}` ); + + $: passwordIsVisible = type === 'text'; -