0.2.0 • Published 2 years ago

@filipecovas/sweet-password-strength v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

sweet-password-strength

NPM

Version Build code style: prettier License

Sweet Password Strength React Component Guide

Congrats! You are just a few steps away from using the component. (Under Construction!!!)

This package is based on password-validator

Installation

Use the package manager npm to install.

npm install @filipecovas/sweet-password-strength

Usage

import React, { useState } from 'react';
import { SweetPasswordStrength } from '@filipecovas/sweet-password-strength';

const App: React.FC = () => {
  const [value, setValue] = useState < string > '';
  return (
    <>
      <input
        type="password"
        name="password"
        value={value}
        onChange={e => setValue(e.target.value)}
      />
      <SweetPasswordStrength
        password={value}
        onChange={PasswordStrenghtState => console.log(PasswordStrenghtState)}
      />
    </>
  );
};

export default App;

Props

password: string

  • isRequired: true
  • default: undefined

onChange: (password) => void

  • isRequired: true
  • default: undefined

Contributing

First fork the project and follow the commands below.

  npm i && npm link && cd example && npm i && npm link @filipecovas/sweet-password-strength && cd ../
  npm start
  cd example && npm run dev

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

0.2.0

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago