Skip to content

Commit 25b87c6

Browse files
authored
Merge pull request #16 from devrnt/docs/examples
Docs/examples
2 parents b18aa73 + a43c776 commit 25b87c6

33 files changed

+19359
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
- Simplicity
1616
- Focused on logic
17+
- Zero dependencies
1718
- No UI restrictions
1819
- Written in TypeScript
1920

@@ -180,8 +181,7 @@ Small playground to showcase the functionalities of `react-use-wizard`:
180181
[https://devrnt.github.io/react-use-wizard/](https://devrnt.github.io/react-use-wizard/)
181182

182183
## Examples
183-
184-
Go to [examples](https://github.com/devrnt/react-use-wiard/tree/master/examples) to check see some examples
184+
Go to [examples](https://github.com/devrnt/react-use-wizard/tree/master/examples) to check out some integrations (Gatsby, NextJS...).
185185

186186
## Async
187187

examples/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Examples
2+
3+
You can view the source code for the examples within their folder, or visit the codesandbox to see how the example works.
4+
5+
| Name | Link |
6+
| ------ | ----------------------------------------------------------------------------------- |
7+
| Gatsby | https://codesandbox.io/s/github/devrnt/react-use-wizard/tree/master/examples/gatsby |
8+
| NextJS | https://codesandbox.io/s/github/devrnt/react-use-wizard/tree/master/examples/nextjs |

examples/gatsby/.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variable files
55+
.env*
56+
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
# Yarn Integrity file
69+
.yarn-integrity

examples/gatsby/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.cache
2+
package.json
3+
package-lock.json
4+
public

examples/gatsby/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"arrowParens": "always",
3+
"semi": true,
4+
"useTabs": false,
5+
"printWidth": 80
6+
}

examples/gatsby/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
The BSD Zero Clause License (0BSD)
2+
3+
Copyright (c) 2020 Gatsby Inc.
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14+
PERFORMANCE OF THIS SOFTWARE.

examples/gatsby/gatsby-browser.js

Whitespace-only changes.

examples/gatsby/gatsby-config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
siteMetadata: {
3+
title: `Gatsby Default Starter`,
4+
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
5+
author: `@gatsbyjs`,
6+
},
7+
plugins: [
8+
`gatsby-plugin-react-helmet`,
9+
{
10+
resolve: `gatsby-source-filesystem`,
11+
options: {
12+
name: `images`,
13+
path: `${__dirname}/src/images`,
14+
},
15+
},
16+
`gatsby-transformer-sharp`,
17+
`gatsby-plugin-sharp`,
18+
{
19+
resolve: `gatsby-plugin-manifest`,
20+
options: {
21+
name: `gatsby-starter-default`,
22+
short_name: `starter`,
23+
start_url: `/`,
24+
background_color: `#663399`,
25+
theme_color: `#663399`,
26+
display: `minimal-ui`,
27+
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
28+
},
29+
},
30+
// this (optional) plugin enables Progressive Web App + Offline functionality
31+
// To learn more, visit: https://gatsby.dev/offline
32+
// `gatsby-plugin-offline`,
33+
],
34+
};

examples/gatsby/gatsby-node.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Implement Gatsby's Node APIs in this file.
3+
*
4+
* See: https://www.gatsbyjs.com/docs/node-apis/
5+
*/
6+
7+
// You can delete this file if you're not using it

examples/gatsby/gatsby-ssr.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
3+
*
4+
* See: https://www.gatsbyjs.com/docs/ssr-apis/
5+
*/
6+
7+
// You can delete this file if you're not using it

0 commit comments

Comments
 (0)