Skip to content

Commit f4869f1

Browse files
author
a602484
committed
Improve intro
1 parent 71718e3 commit f4869f1

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

src/Home.js

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
import React, {Fragment} from 'react';
1+
import React, {Fragment} from 'react'
2+
import styled from 'styled-components'
23

4+
const Paragraph = styled.p`
5+
width: 340px;
6+
padding-left: 12px;
7+
padding-right: 12px;
8+
padding-top: 8px;
9+
`
10+
const H2 = styled.h2`
11+
margin-left: 12px;
12+
`
13+
const Code = styled.code`
14+
font-size: 14px;
15+
`
316
const Home = () => {
417
return (
518
<Fragment>
6-
<h1>Home</h1>
7-
<p>
8-
<b>react-wizard</b> is a step-by-step _wizard_ workflow written in JavaScript with
9-
<a href="https://reactjs.org/">React</a>. It demonstrates an implementation of the
10-
<a href="https://reactjs.org/docs/hooks-reference.html#usecontext">useContext</a> hook to
11-
share a user's input form data (application "state") across components.
12-
</p>
13-
<p>
14-
The step-by-step workflow is applied to a hypothetical task scheduling feature.
15-
</p>
16-
<p>
17-
All form input in this application, whether text input, checkbox, or select, is auto-generated from the
18-
initial state of the context in _WizardContext.js_.
19-
</p>
20-
<p>
21-
Click <a href='/wizard'>Wizard</a> to try demo.
22-
</p>
19+
<H2>Home</H2>
20+
<Paragraph>
21+
<b>react-wizard</b> is a step-by-step <i>wizard</i> written in JavaScript with
22+
using <a href="https://reactjs.org/">React</a>. It demonstrates the <a href="https://reactjs.org/docs/hooks-reference.html#usecontext">useContext</a> hook
23+
to share form data across components.
24+
</Paragraph>
25+
<Paragraph>
26+
A step-by-step workflow is applied to a hypothetical task scheduling feature.
27+
</Paragraph>
28+
<Paragraph>
29+
All form input, whether text input, checkbox, or select, is auto-generated from the
30+
initial state of the context in <Code>WizardContext.js</Code>.
31+
</Paragraph>
32+
<Paragraph>
33+
Click <a href='/wizard'>react-wizard</a> to try the demo.
34+
</Paragraph>
2335
</Fragment>
2436
);
2537
}

src/NotFound.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const NotFound = () => {
88
Route is not supported.
99
</p>
1010
<p>
11-
Click <a href='/wizard'>Wizard</a> to try demo.
11+
Click <a href='/wizard'>react-wizard</a> to try demo.
1212
</p>
1313
</Fragment>
1414
);

src/Routes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import RouteWithLayout from './RouteWithLayout';
44
import Layout from './components/Layout'
55
import Home from './Home'
66
import NotFound from './NotFound'
7-
import WizardForm from './components/WizardForm'
7+
import Wizard from './components/Wizard'
88

99
const Routes = () => {
1010
return (
@@ -16,7 +16,7 @@ const Routes = () => {
1616
path="/"
1717
/>
1818
<RouteWithLayout
19-
component={WizardForm}
19+
component={Wizard}
2020
layout={Layout}
2121
exact
2222
path='/wizard'

0 commit comments

Comments
 (0)