preline
Version:
Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
20 lines (14 loc) • 450 B
text/typescript
import HSStrongPassword from './core';
window.addEventListener('load', () => {
HSStrongPassword.autoInit();
});
document.addEventListener('scroll', () => {
if (!window.$hsStrongPasswordCollection) return false;
const target = window.$hsStrongPasswordCollection.find(
(el) => el.element.isOpened,
);
if (target) target.element.recalculateDirection();
});
if (typeof window !== 'undefined') {
window.HSStrongPassword = HSStrongPassword;
}