Skip to content

Commit a263edf

Browse files
committed
docs: create initial documentation structure
1 parent b04685a commit a263edf

25 files changed

+11135
-0
lines changed

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```console
8+
yarn install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
yarn start
15+
```
16+
17+
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
34+
35+
## To Do
36+
37+
[ ] Fonts page
38+
[ ] Theming page

docs/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/docs/button.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
slug: /button
3+
title: Button
4+
---
5+
6+
Use buttons to trigger an action after a user interaction.
7+
8+
![img](../static/img/docs-button.png)
9+
10+
### Usage
11+
12+
```javascript
13+
import { Button } from 'react95-native';
14+
15+
<Button variant='default' onPress={() => console.warn('onPress')} primary>
16+
Primary
17+
</Button>;
18+
```
19+
20+
### Props
21+
22+
_(all props are optional)_
23+
24+
**`accessibilityLabel`**: `string`
25+
26+
**`active`**: `boolean`
27+
28+
**`children`**: `React.ReactNode`
29+
30+
**`disabled`**: `boolean`
31+
32+
**`onPress`**: `() => void`
33+
34+
**`onLongPress`**: `() => void`
35+
36+
**`primary`**: `boolean`
37+
38+
**`size`**: `Sizes`
39+
40+
**`square`**: `boolean`
41+
42+
**`style`**: `StyleProp<ViewStyle>`
43+
44+
**`variant`**: `ButtonVariants`

docs/docs/fonts.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
slug: /fonts
3+
title: Fonts
4+
---
5+
6+
Fonts section (WIP)

docs/docs/getting-started.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
slug: /
3+
title: Getting Started
4+
---
5+
6+
## Installation
7+
8+
React95 Native is available as an [npm package](https://www.npmjs.com/package/react95-native).
9+
10+
## npm
11+
12+
To install and save your `package.json` dependencies, run:
13+
14+
```sh
15+
// yarn
16+
yarn react95-native
17+
18+
// npm
19+
npm i react95-native
20+
```
21+
22+
## Usage
23+
24+
Simply rap your app content with our custom ThemeProvider (more on the [theming](theming) section) with the theme of your choice... and you're ready to go! 🚀
25+
26+
```jsx
27+
import React from 'react';
28+
import { ThemeProvider, themes } from 'react95-native';
29+
30+
/* Pick a theme of your choice */
31+
const { original } = themes;
32+
33+
const App = () => (
34+
<div>
35+
<ThemeProvider theme={original}>/* ... */</ThemeProvider>
36+
</div>
37+
);
38+
39+
export default App;
40+
```

docs/docs/theming.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
slug: /theming
3+
title: Theming
4+
---
5+
6+
Theming section (WIP)

docs/docusaurus.config.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
module.exports = {
2+
title: 'React95 Native',
3+
tagline:
4+
'Refreshed Windows 95 style UI components for your React Native app.',
5+
url: 'https://your-docusaurus-test-site.com',
6+
baseUrl: '/',
7+
onBrokenLinks: 'throw',
8+
onBrokenMarkdownLinks: 'warn',
9+
favicon: 'img/favicon.ico',
10+
organizationName: 'react95-io', // Usually your GitHub org/user name.
11+
projectName: 'react95-native', // Usually your repo name.
12+
themeConfig: {
13+
navbar: {
14+
title: 'React95',
15+
logo: {
16+
alt: 'React95 Logo',
17+
src: 'img/logo.svg',
18+
},
19+
items: [
20+
{
21+
to: 'docs/',
22+
activeBasePath: 'docs',
23+
label: 'Docs',
24+
position: 'left',
25+
},
26+
{
27+
href: 'https://github.com/react95-io/react95-native',
28+
label: 'GitHub',
29+
position: 'right',
30+
},
31+
],
32+
},
33+
footer: {
34+
style: 'dark',
35+
links: [
36+
{
37+
title: 'Docs',
38+
items: [
39+
{
40+
label: 'Style Guide',
41+
to: 'docs/',
42+
},
43+
],
44+
},
45+
{
46+
title: 'Community',
47+
items: [
48+
{
49+
label: 'Stack Overflow',
50+
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
51+
},
52+
{
53+
label: 'Discord',
54+
href: 'https://discordapp.com/invite/docusaurus',
55+
},
56+
{
57+
label: 'Twitter',
58+
href: 'https://twitter.com/docusaurus',
59+
},
60+
],
61+
},
62+
{
63+
title: 'More',
64+
items: [
65+
{
66+
label: 'GitHub',
67+
href: 'https://github.com/facebook/docusaurus',
68+
},
69+
],
70+
},
71+
],
72+
copyright: `Copyright © ${new Date().getFullYear()} React95 Native`,
73+
},
74+
},
75+
presets: [
76+
[
77+
'@docusaurus/preset-classic',
78+
{
79+
docs: {
80+
sidebarPath: require.resolve('./sidebars.js'),
81+
editUrl: 'https://github.com/react95-io/react95-native',
82+
},
83+
theme: {
84+
customCss: require.resolve('./src/css/custom.css'),
85+
},
86+
},
87+
],
88+
],
89+
};

docs/package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "react-95",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"serve": "docusaurus serve",
12+
"clear": "docusaurus clear"
13+
},
14+
"dependencies": {
15+
"@docusaurus/core": "2.0.0-alpha.70",
16+
"@docusaurus/preset-classic": "2.0.0-alpha.70",
17+
"@mdx-js/react": "^1.6.21",
18+
"clsx": "^1.1.1",
19+
"react": "^16.8.4",
20+
"react-dom": "^16.8.4"
21+
},
22+
"browserslist": {
23+
"production": [
24+
">0.5%",
25+
"not dead",
26+
"not op_mini all"
27+
],
28+
"development": [
29+
"last 1 chrome version",
30+
"last 1 firefox version",
31+
"last 1 safari version"
32+
]
33+
}
34+
}

docs/sidebars.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
someSidebar: {
3+
Guides: ['getting-started', 'theming', 'fonts'],
4+
Components: ['button'],
5+
},
6+
};

docs/src/css/custom.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* stylelint-disable docusaurus/copyright-header */
2+
/**
3+
* Any CSS included here will be global. The classic template
4+
* bundles Infima by default. Infima is a CSS framework designed to
5+
* work well for content-centric websites.
6+
*/
7+
8+
/* You can override the default Infima variables here. */
9+
:root {
10+
--ifm-color-primary: teal;
11+
--ifm-color-primary-dark: rgb(33, 175, 144);
12+
--ifm-color-primary-darker: rgb(31, 165, 136);
13+
--ifm-color-primary-darkest: rgb(26, 136, 112);
14+
--ifm-color-primary-light: rgb(70, 203, 174);
15+
--ifm-color-primary-lighter: rgb(102, 212, 189);
16+
--ifm-color-primary-lightest: rgb(146, 224, 208);
17+
--ifm-code-font-size: 95%;
18+
}
19+
20+
.docusaurus-highlight-code-line {
21+
background-color: rgb(72, 77, 91);
22+
display: block;
23+
margin: 0 calc(-1 * var(--ifm-pre-padding));
24+
padding: 0 var(--ifm-pre-padding);
25+
}

0 commit comments

Comments
 (0)