Skip to content

Commit

Permalink
docs(progressindicator): migrate docs from info addon to .mdx docs (#…
Browse files Browse the repository at this point in the history
…10703)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tay1orjones and kodiakhq[bot] authored Feb 10, 2022
1 parent 6f5bca3 commit 75c1522
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ export const Default = () => (
</ProgressIndicator>
);

Default.parameters = {
info: {
text: `
For React usage, ProgressIndicator holds the currentIndex state to indicate which ProgressStep is the current step. The ProgressIndicator component should always be used with ProgressStep components as its children. Changing currentIndex prop will automatically set the ProgressStep components props (complete, incomplete, current).
For general usage, Progress Indicators display steps in a process. It should indicate when steps have been complete, the active step,
and the steps to come.
`,
},
};

export const Interactive = () => (
<ProgressIndicator
currentIndex={number('Current progress (currentIndex)', 1)}
Expand Down Expand Up @@ -133,22 +123,6 @@ export const Interactive = () => (

Interactive.storyName = 'interactive';

Interactive.parameters = {
info: {
text: `
If you register an onChange handler, the Progress Indicator will become interactive. Your parent component should update the currentIndex prop within the onChange handler.
`,
},
};

export const Skeleton = () => <ProgressIndicatorSkeleton />;

Skeleton.storyName = 'skeleton';

Skeleton.parameters = {
info: {
text: `
Placeholder skeleton state to use when content is loading.
`,
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Props } from '@storybook/addon-docs/blocks';
import { Story, Preview, Props } from '@storybook/addon-docs/blocks';

# ProgressIndicator

Expand All @@ -10,8 +10,38 @@ import { Props } from '@storybook/addon-docs/blocks';

## Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [ProgressIndicator](#progressindicator)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Component API](#component-api)
- [Feedback](#feedback)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Overview

<Preview>
<Story id="components-progressindicator--default" />
</Preview>

For React usage, `ProgressIndicator` holds the `currentIndex` state to indicate
which `ProgressStep` is the current step. The `ProgressIndicator` component
should always be used with `ProgressStep` components as its children.

Changing the `currentIndex` prop will automatically set the `ProgressStep`
components props (`complete`, `incomplete`, `current`). For general usage,
Progress Indicators display steps in a process. It should indicate when steps
have been complete, the active step, and the steps to come.

If you register an `onChange` handler, the Progress Indicator will become
interactive. Your parent component should update the `currentIndex` prop within
the `onChange` handler.

## Component API

<Props />
Expand Down

0 comments on commit 75c1522

Please sign in to comment.