Skip to content

Commit

Permalink
feat: add really basic static prop table in basic story doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Jan 21, 2020
1 parent 52b2adf commit d64ed56
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions stories/bar_chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,46 @@ basic.story = {
componentSubtitle: 'Handy status label',
docs: {
// eslint-disable-next-line react/display-name
page: () => (
<>
<p>Test</p>
</>
),
page: () => {
const toggleSpec = boolean('toggle bar spec', true);
const specId = toggleSpec ? 'bars1' : 'bars2';
return (
<>
<p>Basic Bar Chart Documentation</p>
<br />
<table id="basic-bar-chart">
<tbody>
<th>Bar Series Prop Names</th>
<th>Basic Bar Chart Values</th>
<tr>
<td>specId</td>
<td>{getSpecId(specId)}</td>
</tr>
<tr>
<td>name</td>
<td>Simple Bar Series</td>
</tr>
<tr>
<td>xScaleType</td>
<td>{ScaleType.Linear}</td>
</tr>
<tr>
<td>yScaleType</td>
<td>{ScaleType.Linear}</td>
</tr>
<tr>
<td>xAccessor</td>
<td>&apos;x&apos;</td>
</tr>
<tr>
<td>yAccessors</td>
<td>[&apos;y&apos;]</td>
</tr>
</tbody>
</table>
</>
);
},
container: DocsContainer,
},
},
Expand Down

0 comments on commit d64ed56

Please sign in to comment.