-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathindex.tsx
36 lines (31 loc) · 1.07 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, { useState } from 'react';
import styled from '@emotion/styled';
import { Interface } from '../../../styles';
import { Heading2, Button } from '../../../../ignitus-Shared';
import { Progress } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Molecules/ignitus-Progress';
import { flexibleRowDiv } from '../../../../ignitus-Shared/ignitus-DesignSystem/shared';
const Middle = styled(flexibleRowDiv)``;
export const InterfaceProgress = () => {
const [current, updateCurrent] = useState(1);
const steps = 5;
const next = () =>
current === steps + 1 ? null : updateCurrent(current + 1);
const previous = () => (current === 1 ? null : updateCurrent(current - 1));
return (
<Interface>
<Heading2>Signup Progress</Heading2>
<hr />
<br />
<Progress steps={steps} current={current} />
<br />
<Middle>
<Button category="primary" onClick={previous}>
Previous
</Button>
<Button category="primary" onClick={next}>
Next
</Button>
</Middle>
</Interface>
);
};