Merge pull request #2 from andrerfneves/feature/docz

Feature/docz-base
This commit is contained in:
George Lima 2018-11-27 12:22:07 -03:00 committed by GitHub
commit 83fd8dd6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13437 additions and 9 deletions

3
.gitignore vendored
View File

@ -3,4 +3,5 @@ node_modules
dist
.DS_Store
flow-coverage
build
build
.docz

8
app/components/index.mdx Normal file
View File

@ -0,0 +1,8 @@
---
name: Home
route: /
---
# UI Components
Please navigate on the left menu side to know more about the app's components

View File

@ -8,17 +8,26 @@ import { styles } from './styles';
// TODO: Not sure this is the best approach to styling
// in a StyledComponents-powered application
const Wrapper = styled.div`${styles.wrapper}`;
const Wrapper = styled.div`
${styles.wrapper}
`;
export const SidebarComponent = () => (
type MenuItem = { route: string, label: string };
type Props = {
options?: MenuItem[],
};
export const SidebarComponent = ({ options }: Props) => (
<Wrapper>
{MENU_OPTIONS.map(item => (
<Link
key={item.route}
to={item.route}
>
{(options || []).map(item => (
<Link key={item.route} to={item.route}>
{item.label}
</Link>
))}
</Wrapper>
);
SidebarComponent.defaultProps = {
options: MENU_OPTIONS,
};

View File

@ -0,0 +1,16 @@
---
name: Sidebar
---
import { Playground, PropsTable } from 'docz'
import { SidebarComponent } from './index.js'
# Sidebar
<PropsTable of={SidebarComponent} />
## Basic usage
<Playground>
<SidebarComponent />
</Playground>

8
doczrc.js Normal file
View File

@ -0,0 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */
import { css } from 'docz-plugin-css';
export default {
title: 'ZCash',
description: 'ZCash UI Documentation',
plugins: [css()],
};

View File

@ -17,7 +17,9 @@
"electron:pack": "yarn electron:prepare && electron-builder --dir",
"electron:dist": "yarn electron:prepare && electron-builder",
"preelectron:prepare": "yarn build",
"icon:build": "./node_modules/.bin/electron-icon-maker --input=build-assets/icon.png --output=./build"
"icon:build": "./node_modules/.bin/electron-icon-maker --input=build-assets/icon.png --output=./build",
"docz:dev": "docz dev",
"docz:build": "docz build"
},
"author": {
"name": "André Neves",
@ -38,6 +40,8 @@
"concurrently": "^4.1.0",
"cross-env": "^5.2.0",
"css-loader": "^1.0.1",
"docz": "^0.12.13",
"docz-plugin-css": "^0.11.0",
"electron": "^3.0.10",
"electron-builder": "^20.36.2",
"electron-icon-maker": "^0.0.4",

13382
yarn.lock Normal file

File diff suppressed because it is too large Load Diff