Skip to content

Commit

Permalink
update docs a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
James Klassen authored and James Klassen committed Jul 12, 2023
1 parent 61c649b commit 1e65b71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 17 additions & 0 deletions components/skeleton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,23 @@ For example:

When skeletized, this heading will take up `45%` of the available width.

## Skeleton groups
Skeleton groups can be used to ensure a collection of components all appear at the same time. This can be used to prevent individual components from popping in before everything has loaded.

```js
import { SkeletonGroupMixin } from '@brightspace-ui/core/skeleton/skeleton-group-mixin.js';

class MyElement extends SkeletonGroupMixin(LitElement) {

render() {
return html`
// Anything that can be skeletonized.
// All components will remain in skeleton state until they have all loaded
`;
}
}
```

## Future Enhancements

Looking for an enhancement not listed here? Is there a core component that should support skeletons but doesn't yet? Create a GitHub issue!
4 changes: 1 addition & 3 deletions components/skeleton/demo/skeleton-group-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { SkeletonGroupMixin } from '../skeleton-group-mixin.js';

class SkeletonGroupTestWrapper extends SkeletonGroupMixin(LitElement) {
render() {
return html`
<slot></slot>
`;
return html`<slot></slot>`;
}
}
customElements.define('d2l-skeleton-group-test-wrapper', SkeletonGroupTestWrapper);
Expand Down

0 comments on commit 1e65b71

Please sign in to comment.