Skip to content

Commit

Permalink
fixup! Feat(web-react): Introduced Skeleton component #DS-1625
Browse files Browse the repository at this point in the history
  • Loading branch information
Řehořková Kateřina committed Feb 5, 2025
1 parent 1e5fb2d commit f6a9112
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/web-react/src/components/Skeleton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ available.
import { SkeletonText, SkeletonHeading, SkeletonShape } from '@lmc-eu/spirit-web-react/components';
```

On the parent element, you must use `aria-busy` and `aria-live` attributes to indicate that the content inside is loading.
On the parent element, you must use `aria-busy` and `aria-live` attributes to indicate that the content inside is
loading.
The `aria-busy` is set to `true` when the content is loading, and `aria-live` is set to `polite` to announce the loading
state to screen readers.

Expand Down Expand Up @@ -52,16 +53,16 @@ SkeletonShape defines a placeholder for loading the Shape component.
```jsx
<SkeletonShape width={100} height={100}/>
<SkeletonShape width={100} height={100} borderRadius="full"/>
<SkeletonShape width={100} height={100} borderRadius={{mobile: '100', tablet: '400', desktop: '500'}}/>
<SkeletonShape width={100} height={100} borderRadius={{ mobile: '100', tablet: '400', desktop: '500' }}/>
```

### API

| Name | Type | Default | Required | Description |
| -------------- | ------------------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `borderRadius` | [Radius dictionary][radius-size] \ `object` | `400` || Border radius variant, use object to set responsive values, e.g. {mobile: '200',tablet: '300',desktop: '400'} |
| `width` | `number` ||| Specifies the width of an shape |
| `height` | `number` ||| Specifies the height of an shape |
| Name | Type | Default | Required | Description |
| -------------- | ------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `borderRadius` | [Radius dictionary][radius-size] \ `object` | `400` || Border radius variant, use object to set responsive values, e.g. { mobile: '200', tablet: '300', desktop: '400' } |
| `width` | `number` ||| Specifies the width of an shape |
| `height` | `number` ||| Specifies the height of an shape |

On top of the API options, the components accept [additional attributes][readme-additional-attributes].
If you need more control over the styling of a component, you can use [style props][readme-style-props]
Expand Down

0 comments on commit f6a9112

Please sign in to comment.