// Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React, { useState } from 'react'; import { FormField, Input, Flex, Button, Heading, } from 'amazon-chime-sdk-component-library-react'; import './login.css'; const Login = (props) => { const [userName, setUsername] = useState(''); const [password, setPassword] = useState(''); const { login, register } = props; const onRegister = (e) => { e.preventDefault(); register(userName, password, ''); }; const onLogin = (e) => { e.preventDefault(); login(userName, password); }; const onUserName = (e) => { setUsername(e.target.value); }; const onPassword = (e) => { setPassword(e.target.value); }; return ( Sign in Enter your information and select Sign in or Register
onUserName(e)} value={userName} type="text" showClear layout="horizontal" /> onPassword(e)} value={password} showClear layout="horizontal" infoText="Minimum 8 characters, at least 1 uppercase, 1 number, 1 special character" />
); }; export default Login;