https://github.com/polydile/dile-password-checker
https://github.com/polydile/dile-password-checker
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/polydile/dile-password-checker
- Owner: Polydile
- License: mit
- Created: 2022-10-17T16:00:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-17T17:07:18.000Z (over 3 years ago)
- Last Synced: 2025-01-25T18:43:29.482Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dile-password-checker
Password checker component, based on LitElement.
```
```
## Install
```
npm install dile-password-checker
```
## Usage
Import the component.
```javascript
import 'dile-password-checker/dile-password-checker.js';
```
Use the component
```html
```
## Properties
- **label**: the element label
- **buttonLabel**: label for button show/hide
- **validateLabel**: label for button validate
- **hidePassword**: Flag to know if the inputs should hide the passwords
- **error**: on true, the element has an error
## Events
### dile-password-checker-error
The `dile-password-checker-error` event is dispatched when passwords do not match.
```
el.addEventListener('dile-password-checker-error', (e) => {
console.log('dile-password-checker-error event');
});
```
### dile-password-checker-validate
The `dile-password-checker-validate` event is dispatched when passwords match.
```
el.addEventListener('dile-password-checker-validate', (e) => {
console.log('dile-password-checker-validate event');
});
```