-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added markdown, njk examples + properties * update example * add classes property * add classes param * added markdown, njk examples + properties * update example * add classes property * add classes param * add classes to example * update param name * fix typo * change size type * markdown amends Co-authored-by: Houston <[email protected]> Co-authored-by: Dayle Salmon <[email protected]>
- Loading branch information
1 parent
99e7870
commit 217c02f
Showing
6 changed files
with
88 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% raw %} | ||
{% from "wmnds/components/loader/_loader.njk" import wmndsLoader %} | ||
{{ | ||
wmndsLoader({ | ||
size: "small", | ||
classes: null | ||
}) | ||
}} | ||
{% endraw %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"wmndsLoaderProps": [ | ||
{ | ||
"name": "size", | ||
"type": "string", | ||
"description": "Determines the display size of the loader. If left blank, the loader will display at the default size. Other accepted values are <code class='wmnds-website-inline-code'>small</code> or <code class='wmnds-website-inline-code'>large</code>." | ||
}, | ||
{ | ||
"name": "classes", | ||
"type": "string", | ||
"description": "Classes to add to the loader component." | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{% extends "www/_layouts/layout-left-pane.njk" %} | ||
{% set pageTitle="Loader" %} | ||
{% from "www/_partials/component-example/component-example.njk" import compExample %} | ||
|
||
{% block content %} | ||
|
||
{% markdown %} | ||
{# Loader #} | ||
|
||
## Loader | ||
|
||
{# What #} | ||
|
||
### What does it do? | ||
|
||
- Helps users to understand they need to wait for something to finish happening | ||
- Continues to play the animation until the action is complete | ||
|
||
{# When #} | ||
|
||
### When to use it? | ||
|
||
- When you are calling an API | ||
- In the area of the page that the action is occurring | ||
- Example: within a search box | ||
|
||
{# When not #} | ||
|
||
### When not to use it? | ||
|
||
- A service should not go live if there is a whole-page loading spinner | ||
- Try to avoid using a loading spinner, our services should respond quickly | ||
- If an action takes a long time, users will lose trust in the service | ||
|
||
**By default you should aim to use the 'normal sized loader'.** <br> | ||
Only when the normal sized loader is not fit for purpose should you use the large or small sized loader. | ||
|
||
Change the text within <code class="wmnds-website-inline-code">.wmnds-loader\_\_content</code> from 'Content is loading...' to something that describes what it is you are loading, this will help with accessibility. | ||
|
||
{% endmarkdown %} | ||
|
||
{% from "wmnds/components/loader/_loader.njk" import wmndsLoader %} | ||
{{ | ||
compExample([ | ||
wmndsLoader({ | ||
size: 'small' | ||
}), | ||
wmndsLoader(), | ||
wmndsLoader({ | ||
size: 'large' | ||
}) | ||
], { | ||
componentPath: "wmnds/components/loader/", | ||
njk: true, | ||
njkProps: wmndsLoaderProps, | ||
js: false, | ||
iframe: false | ||
}) | ||
}} | ||
|
||
{% endblock %} |