Skip to content
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

docs(vx-hierarchy, vx-scale): convert to docgen #710

Merged
merged 2 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/vx-demo/src/components/PackageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export default function PackageList({
{!compact && <p>Annotation lines with text</p>}
</li>
<li className={cx(emphasizePackage === 'scale' && 'emphasize')}>
<a href="/static/docs/vx-scale.html">@vx/scale</a>
{!compact && <p>d3 scales to map data to visual attributes</p>}
<a href="/docs/scale">@vx/scale</a>
{!compact && <p>Map data to visual dimensions</p>}
</li>
<li className={cx(emphasizePackage === 'shape' && 'emphasize')}>
<a href="/static/docs/vx-shape.html">@vx/shape</a>
Expand Down Expand Up @@ -80,8 +80,8 @@ export default function PackageList({
{!compact && <p>Represent data values using color</p>}
</li>
<li className={cx(emphasizePackage === 'hierarchy' && 'emphasize')}>
<a href="/static/docs/vx-hierarchy.html">@vx/hierarchy</a>
{!compact && <p>Multiple layouts for hierarchical or nested data</p>}
<a href="/docs/hierarchy">@vx/hierarchy</a>
{!compact && <p>Components to visualize hierarchical or nested data</p>}
</li>
<li className={cx(emphasizePackage === 'network' && 'emphasize')}>
<a href="/static/docs/vx-network.html">@vx/network</a>
Expand Down
19 changes: 19 additions & 0 deletions packages/vx-demo/src/pages/docs/Hierarchy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import HierarchyReadme from '!!raw-loader!../../../../vx-hierarchy/Readme.md';
import Cluster from '../../../../vx-hierarchy/src/hierarchies/Cluster';
import Pack from '../../../../vx-hierarchy/src/hierarchies/Pack';
import Partition from '../../../../vx-hierarchy/src/hierarchies/Partition';
import Tree from '../../../../vx-hierarchy/src/hierarchies/Tree';
import Treemap from '../../../../vx-hierarchy/src/hierarchies/Treemap';
import DocPage from '../../components/DocPage';
import { DocGenInfo } from '../../types';

const components = [Cluster, Pack, Partition, Tree, Treemap].map(
c =>
// @ts-ignore
c.__docgenInfo,
) as DocGenInfo[];

export default () => (
<DocPage components={components} readme={HierarchyReadme} vxPackage="hierarchy" />
);
5 changes: 5 additions & 0 deletions packages/vx-demo/src/pages/docs/Scale.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
import ScaleReadme from '!!raw-loader!../../../../vx-scale/Readme.md';
import DocPage from '../../components/DocPage';

export default () => <DocPage readme={ScaleReadme} vxPackage="scale" />;
147 changes: 0 additions & 147 deletions packages/vx-demo/src/static/docs/vx-hierarchy.html

This file was deleted.

Loading