Redesign login screen and add help box

This commit is contained in:
rui hildt 2020-05-13 11:19:37 +02:00
parent 1c9dbf0615
commit b8fa7cdd98
2 changed files with 42 additions and 39 deletions

View File

@ -10,7 +10,8 @@ const containerStyle = {
margin: '0 auto', margin: '0 auto',
borderRadius: 7, borderRadius: 7,
background: 'white', background: 'white',
marginTop: 50, marginTop: '10vh',
marginBottom: '10vh',
}; };
function App() { function App() {

View File

@ -1,55 +1,57 @@
import React from 'react'; import React from 'react';
import { import {
Container,
Content, Content,
FlexboxGrid, FlexboxGrid,
Panel, Panel,
Form, Form,
FormGroup, FormGroup,
ControlLabel,
FormControl, FormControl,
HelpBlock,
Button, Button,
ButtonToolbar,
} from 'rsuite'; } from 'rsuite';
const boxStyle = {
margin: '50px 10px',
};
function Login() { function Login() {
return ( return (
<Container>
<Content> <Content>
<FlexboxGrid justify='center'> <FlexboxGrid justify='center'>
<FlexboxGrid.Item> <FlexboxGrid.Item>
<Panel header={<h3>Login</h3>} bordered> <Panel
<Form fluid> header={<h3>Login</h3>}
bordered
style={boxStyle}
>
<Form horizontal>
<FormGroup> <FormGroup>
<ControlLabel>
Username or email address
</ControlLabel>
<FormControl name='name' />
</FormGroup>
<FormGroup>
<ControlLabel>Password</ControlLabel>
<FormControl <FormControl
name='password' name='email'
type='password' type='email'
placeholder='email'
/> />
</FormGroup> </FormGroup>
<FormGroup> <FormGroup>
<ButtonToolbar> <FormControl
<Button appearance='primary'> name='password'
Sign in type='password'
</Button> placeholder='password'
<Button appearance='link'> />
Forgot password? <HelpBlock tooltip>
</Button> Minimum password length is 8 characters
</ButtonToolbar> </HelpBlock>
</FormGroup> </FormGroup>
<FormGroup>
<Button appearance='primary' block>Sign in</Button>
</FormGroup>
<Button appearance='link'>Forgot password?</Button>
</Form> </Form>
</Panel> </Panel>
</FlexboxGrid.Item> </FlexboxGrid.Item>
</FlexboxGrid> </FlexboxGrid>
</Content> </Content>
</Container>
); );
} }