Skip to content
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
24 changes: 3 additions & 21 deletions packages/react-core/src/components/Spinner/examples/Spinner.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,13 @@ propComponents: ['Spinner']

## Examples
### Basic
```js
import React from 'react';
import { Spinner } from '@patternfly/react-core';

<Spinner isSVG aria-label="Contents of the basic example"/>
```ts file="./SpinnerBasic.tsx"
```

### Size variations
```js
import React from 'react';
import { Spinner } from '@patternfly/react-core';

<React.Fragment>
<Spinner isSVG size="sm" aria-label="Contents of the small example"/>
<Spinner isSVG size="md" aria-label="Contents of the medium example"/>
<Spinner isSVG size="lg" aria-label="Contents of the large example"/>
<Spinner isSVG size="xl" aria-label="Contents of the extra large example"/>
</React.Fragment>
```ts file="./SpinnerSizeVariations.tsx"
```

### Custom size
```js
import React from 'react';
import { Spinner } from '@patternfly/react-core';

<Spinner isSVG diameter="80px" aria-label="Contents of the custom size example"/>
```ts file="./SpinnerCustomSize.tsx"
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import React from 'react';
import { Spinner } from '@patternfly/react-core';

export const SpinnerBasic: React.FunctionComponent = () => <Spinner isSVG aria-label="Contents of the basic example" />;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Spinner } from '@patternfly/react-core';

export const SpinnerCustomSize: React.FunctionComponent = () => (
<Spinner isSVG diameter="80px" aria-label="Contents of the custom size example" />
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { Spinner } from '@patternfly/react-core';

export const SpinnerSizeVariations: React.FunctionComponent = () => (
<React.Fragment>
<Spinner isSVG size="sm" aria-label="Contents of the small example" />
<Spinner isSVG size="md" aria-label="Contents of the medium example" />
<Spinner isSVG size="lg" aria-label="Contents of the large example" />
<Spinner isSVG size="xl" aria-label="Contents of the extra large example" />
</React.Fragment>
);