Skip to content
Permalink
Browse files

docs inside storybook

  • Loading branch information...
amcdnl committed Mar 6, 2019
1 parent 585efbe commit 931fa7fa95c5544eac8ce0c976f2eaa6d3dbffbe
Showing with 255 additions and 3 deletions.
  1. +19 −1 .storybook/preview-head.html
  2. +1 −2 README.md
  3. +189 −0 package-lock.json
  4. +1 −0 package.json
  5. +44 −0 src/docs.story.tsx
  6. +1 −0 types/typings.d.ts
@@ -2,7 +2,9 @@
body {
font-family: 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-weight: 400;
color: #23241f;
font-size: 14px;
line-height: 1.4;
color: #fff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--color-background:#22272b;
@@ -12,4 +14,20 @@
--color-primary:#67c2e4;
--color-on-primary:#fff;
}
a {
color: #67c2e4;
}
.doc-container {
padding: 15px 40px;
top: 0;
position: fixed;
left: 0;
overflow: auto;
bottom: 0;
right: 0;
}
pre {
background: #232323;
padding: 15px;
}
</style>
@@ -24,8 +24,7 @@ creating charts without sacraficing customization ability.


## 🚀 Quick Links
- Checkout the [demos](https://jask-oss.github.io/reaviz/)
- Learn more in the [docs](docs/README.md)
- Checkout the [demos and docs](https://jask-oss.github.io/reaviz/)
- Try it yourself on [Codesandbox](https://codesandbox.io/embed/m7rl2z1989)
- Learn about updates from the [changelog](CHANGELOG.md)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -105,6 +105,7 @@
"react": "^16.8.4",
"react-docgen-typescript-loader": "^3.0.1",
"react-dom": "^16.8.4",
"react-markdown": "^4.0.6",
"react-testing-library": "^6.0.0",
"rollup": "^1.4.1",
"rollup-plugin-node-resolve": "^4.0.1",
@@ -0,0 +1,44 @@
import ReactMarkdown from 'react-markdown';
import React from 'react';
import { storiesOf } from '@storybook/react';

import * as whyDoc from '../docs/getting-started/why.md';
import * as installingDoc from '../docs/getting-started/installing.md';
import * as developingDoc from '../docs/getting-started/developing.md';
import * as cssDoc from '../docs/getting-started/css-vars.md';
import * as contribDoc from '../docs/CONTRIBUTING.md';

import * as areaChartDoc from '../docs/charts/area-chart.md';
import * as barChartDoc from '../docs/charts/bar-chart.md';
import * as lineChartDoc from '../docs/charts/line-chart.md';
import * as pieChartDoc from '../docs/charts/pie-chart.md';
import * as sparklineDoc from '../docs/charts/sparklines.md';
import * as mapDoc from '../docs/charts/map.md';

import * as customChartsDoc from '../docs/advanced/custom-charts.md';
import * as animationsDoc from '../docs/advanced/custom-charts.md';

const Markdown = ({ source }) => (
<div className="doc-container">
<ReactMarkdown source={source} />
</div>
);

storiesOf('Documentation/Getting Started', module)
.add('Why', () => <Markdown source={whyDoc} />)
.add('Installing', () => <Markdown source={installingDoc} />)
.add('Developing', () => <Markdown source={developingDoc} />)
.add('CSS Variables', () => <Markdown source={cssDoc} />)
.add('Contributing', () => <Markdown source={contribDoc} />);

storiesOf('Documentation/Charts', module)
.add('Area Chart', () => <Markdown source={areaChartDoc} />)
.add('Line Chart', () => <Markdown source={lineChartDoc} />)
.add('Bar Chart', () => <Markdown source={barChartDoc} />)
.add('Pie Chart', () => <Markdown source={pieChartDoc} />)
.add('Sparklines', () => <Markdown source={sparklineDoc} />)
.add('Map', () => <Markdown source={mapDoc} />);

storiesOf('Documentation/Advanced', module)
.add('Custom Charts', () => <Markdown source={customChartsDoc} />)
.add('Animations', () => <Markdown source={animationsDoc} />);
@@ -1,5 +1,6 @@
declare module '*.json';
declare module '*.css';
declare module '*.scss';
declare module '*.md';

type BigInt = string;

0 comments on commit 931fa7f

Please sign in to comment.
You can’t perform that action at this time.