@hashicorp/design-system-components
Version:
Helios Design System Components
20 lines (16 loc) • 801 B
JavaScript
import HdsIcon from '../../icon/index.js';
import { precompileTemplate } from '@ember/template-compilation';
import { setComponentTemplate } from '@ember/component';
import templateOnly from '@ember/component/template-only';
/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: MPL-2.0
*/
const HdsFormVisibilityToggle = setComponentTemplate(precompileTemplate("<button class=\"hds-form-visibility-toggle\" type=\"button\" aria-label={{@ariaLabel}} ...attributes>\n <HdsIcon @name={{if @isVisible \"eye\" \"eye-off\"}} @size=\"16\" />\n <span class=\"sr-only\" aria-live=\"polite\">{{@ariaMessageText}}</span>\n</button>", {
strictMode: true,
scope: () => ({
HdsIcon
})
}), templateOnly());
export { HdsFormVisibilityToggle as default };
//# sourceMappingURL=index.js.map