Skip to content

Commit 0d4dcec

Browse files
author
Nikolai Lopin
committed
docs: migrate InlineSpinner
1 parent ffcddfb commit 0d4dcec

File tree

3 files changed

+34
-44
lines changed

3 files changed

+34
-44
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Meta, StoryObj } from '@storybook/react';
2+
import { InlineSpinner } from '../InlineSpinner';
3+
4+
const meta: Meta = {
5+
title: 'Components/InlineSpinner',
6+
component: InlineSpinner,
7+
argTypes: {
8+
size: {
9+
control: 'radio',
10+
options: ['medium', 'small']
11+
}
12+
}
13+
};
14+
15+
export default meta;
16+
17+
type Story = StoryObj<typeof InlineSpinner>;
18+
19+
export const Default: Story = {};
20+
21+
export const Small: Story = {
22+
args: {
23+
size: 'small'
24+
}
25+
};
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
---
2-
name: InlineSpinner
3-
menu: Components
4-
route: /components/inline-spinner
5-
---
6-
7-
import { Playground } from 'docz';
1+
import { Meta, ArgsTable, Primary, Stories } from '@storybook/blocks';
82
import { InlineSpinner } from '../InlineSpinner';
9-
import { Colors } from '../../../essentials';
10-
import { InlineSpinnerPropsTable } from './InlineSpinnerPropsTable';
11-
import { Combination } from '../../../docs/Combination';
123
import { StyledSystemLinks } from '../../../docs/StyledSystemLinks';
4+
import * as InlineSpinnerStories from './InlineSpinner.stories';
5+
6+
<Meta of={InlineSpinnerStories} />
137

148
# InlineSpinner
159

10+
<Primary />
11+
1612
A spinner is a visual indicator of an ongoing, user-initiated process. Place the spinner where you want to focus users’
1713
attention when the process completes. Provide a brief description of the process, for example, “Loading…”. Inline spinners
1814
are used for showing the progress of an operation related to a specific component (buttons, etc...) and the default size
@@ -23,18 +19,8 @@ more than 200 milliseconds. Additionally it is recommended that the verb on the
2319

2420
## Properties
2521

26-
<InlineSpinnerPropsTable />
27-
<br />
28-
<StyledSystemLinks component="InlineSpinner" supportedProps={['margin']} />
22+
<ArgsTable of={InlineSpinner} />
2923

30-
## Examples
31-
32-
<Playground>
33-
<InlineSpinner />
34-
</Playground>
35-
36-
## Combinations
24+
<StyledSystemLinks component="InlineSpinner" supportedProps={['margin']} />
3725

38-
<Combination size={["small", "medium"]}>
39-
{(props, i) => <InlineSpinner key={i} {...props} />}
40-
</Combination>
26+
<Stories />

src/components/InlineSpinner/docs/InlineSpinnerPropsTable.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)