-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create initial documentation structure #18
Open
luizbaldi
wants to merge
2
commits into
master
Choose a base branch
from
docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. | ||
|
||
## Installation | ||
|
||
```console | ||
yarn install | ||
``` | ||
|
||
## Local Development | ||
|
||
```console | ||
yarn start | ||
``` | ||
|
||
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
## Build | ||
|
||
```console | ||
yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
## Deployment | ||
|
||
```console | ||
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy | ||
``` | ||
|
||
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. | ||
|
||
## To Do | ||
|
||
[ ] Fonts page | ||
[ ] Theming page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
slug: /button | ||
title: Button | ||
--- | ||
|
||
Use buttons to trigger an action after a user interaction. | ||
|
||
![img](../static/img/docs-button.png) | ||
|
||
### Usage | ||
|
||
```javascript | ||
import { Button } from 'react95-native'; | ||
|
||
<Button variant='default' onPress={() => console.warn('onPress')} primary> | ||
Primary | ||
</Button>; | ||
``` | ||
|
||
### Props | ||
|
||
_(all props are optional)_ | ||
|
||
**`accessibilityLabel`**: `string` | ||
|
||
**`active`**: `boolean` | ||
|
||
**`children`**: `React.ReactNode` | ||
|
||
**`disabled`**: `boolean` | ||
|
||
**`onPress`**: `() => void` | ||
|
||
**`onLongPress`**: `() => void` | ||
|
||
**`primary`**: `boolean` | ||
|
||
**`size`**: `Sizes` | ||
|
||
**`square`**: `boolean` | ||
|
||
**`style`**: `StyleProp<ViewStyle>` | ||
|
||
**`variant`**: `ButtonVariants` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
slug: /fonts | ||
title: Fonts | ||
--- | ||
|
||
Fonts section (WIP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
slug: / | ||
title: Getting Started | ||
--- | ||
|
||
## Installation | ||
|
||
React95 Native is available as an [npm package](https://www.npmjs.com/package/react95-native). | ||
|
||
## npm | ||
|
||
To install and save your `package.json` dependencies, run: | ||
|
||
```sh | ||
// yarn | ||
yarn react95-native | ||
|
||
// npm | ||
npm i react95-native | ||
``` | ||
|
||
## Usage | ||
|
||
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! 🚀 | ||
|
||
```jsx | ||
import React from 'react'; | ||
import { ThemeProvider, themes } from 'react95-native'; | ||
|
||
/* Pick a theme of your choice */ | ||
const { original } = themes; | ||
|
||
const App = () => ( | ||
<div> | ||
<ThemeProvider theme={original}>/* ... */</ThemeProvider> | ||
</div> | ||
); | ||
|
||
export default App; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
slug: /theming | ||
title: Theming | ||
--- | ||
|
||
Theming section (WIP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
module.exports = { | ||
title: 'React95 Native', | ||
tagline: | ||
'Refreshed Windows 95 style UI components for your React Native app.', | ||
url: 'https://your-docusaurus-test-site.com', | ||
baseUrl: '/', | ||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
favicon: 'img/favicon.ico', | ||
organizationName: 'react95-io', // Usually your GitHub org/user name. | ||
projectName: 'react95-native', // Usually your repo name. | ||
themeConfig: { | ||
navbar: { | ||
title: 'React95', | ||
logo: { | ||
alt: 'React95 Logo', | ||
src: 'img/logo.svg', | ||
}, | ||
items: [ | ||
{ | ||
to: 'docs/', | ||
activeBasePath: 'docs', | ||
label: 'Docs', | ||
position: 'left', | ||
}, | ||
{ | ||
href: 'https://github.com/react95-io/react95-native', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Style Guide', | ||
to: 'docs/', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Stack Overflow', | ||
href: 'https://stackoverflow.com/questions/tagged/docusaurus', | ||
}, | ||
{ | ||
label: 'Discord', | ||
href: 'https://discordapp.com/invite/docusaurus', | ||
}, | ||
{ | ||
label: 'Twitter', | ||
href: 'https://twitter.com/docusaurus', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'More', | ||
items: [ | ||
{ | ||
label: 'GitHub', | ||
href: 'https://github.com/facebook/docusaurus', | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: `Copyright © ${new Date().getFullYear()} React95 Native`, | ||
}, | ||
}, | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs: { | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: 'https://github.com/react95-io/react95-native', | ||
}, | ||
theme: { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}, | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "react-95", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start", | ||
"build": "docusaurus build", | ||
"swizzle": "docusaurus swizzle", | ||
"deploy": "docusaurus deploy", | ||
"serve": "docusaurus serve", | ||
"clear": "docusaurus clear" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "2.0.0-alpha.70", | ||
"@docusaurus/preset-classic": "2.0.0-alpha.70", | ||
"@mdx-js/react": "^1.6.21", | ||
"clsx": "^1.1.1", | ||
"react": "^16.8.4", | ||
"react-dom": "^16.8.4" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
someSidebar: { | ||
Guides: ['getting-started', 'theming', 'fonts'], | ||
Components: ['button'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* stylelint-disable docusaurus/copyright-header */ | ||
/** | ||
* Any CSS included here will be global. The classic template | ||
* bundles Infima by default. Infima is a CSS framework designed to | ||
* work well for content-centric websites. | ||
*/ | ||
|
||
/* You can override the default Infima variables here. */ | ||
:root { | ||
--ifm-color-primary: teal; | ||
--ifm-color-primary-dark: rgb(33, 175, 144); | ||
--ifm-color-primary-darker: rgb(31, 165, 136); | ||
--ifm-color-primary-darkest: rgb(26, 136, 112); | ||
--ifm-color-primary-light: rgb(70, 203, 174); | ||
--ifm-color-primary-lighter: rgb(102, 212, 189); | ||
--ifm-color-primary-lightest: rgb(146, 224, 208); | ||
--ifm-code-font-size: 95%; | ||
} | ||
|
||
.docusaurus-highlight-code-line { | ||
background-color: rgb(72, 77, 91); | ||
display: block; | ||
margin: 0 calc(-1 * var(--ifm-pre-padding)); | ||
padding: 0 var(--ifm-pre-padding); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing all props manually doesn't sound like a good idea, I'll take a look to see if we can generate them based on the component's
Props
type.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that should be a priority because updating it manually would be cumbersome