a-login-library
v1.0.4
Published
Made with create-react-library
Downloads
4
Readme
login-library
Made with create-react-library
Install
npm install a-login-library
Usage
import React, { useState } from 'react';
import { LoginForm } from 'a-login-library';
function App() {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [loginMessage, setLoginMessage] = useState('');
const handleLogin = async () => {
console.log('Username:', username);
console.log('Password:', password);
setTimeout(() => {
setLoginMessage('Login successful!');
}, 2000);
};
return (
<div>
<LoginForm
username={username}
password={password}
setUsername={setUsername}
setPassword={setPassword}
handleLogin={handleLogin}
loginMessage={loginMessage}
/>
</div>
);
}
export default App;