diff --git a/src/wmnds/components/button/_button.njk b/src/wmnds/components/button/_button.njk index 775205102..60fe55626 100644 --- a/src/wmnds/components/button/_button.njk +++ b/src/wmnds/components/button/_button.njk @@ -45,7 +45,7 @@ {{ _content }} {{ wmndsLoader({ - customClass: 'wmnds-btn__icon wmnds-btn__icon--right', + classes: 'wmnds-btn__icon wmnds-btn__icon--right', size: 'btn' }) }} diff --git a/src/wmnds/components/loader/_example.njk b/src/wmnds/components/loader/_example.njk new file mode 100644 index 000000000..e79d54fc9 --- /dev/null +++ b/src/wmnds/components/loader/_example.njk @@ -0,0 +1,10 @@ +{% raw %} +{% from "wmnds/components/loader/_loader.njk" import wmndsLoader %} + +{{ + wmndsLoader({ + size: "small", + classes: null + }) +}} +{% endraw %} \ No newline at end of file diff --git a/src/wmnds/components/loader/_loader.njk b/src/wmnds/components/loader/_loader.njk index 417e7210b..f25ae4ead 100644 --- a/src/wmnds/components/loader/_loader.njk +++ b/src/wmnds/components/loader/_loader.njk @@ -5,10 +5,10 @@ Only two size modifiers are 'large' and 'small' #} {% set size = " wmnds-loader--" + params.size if params.size %} {% set commentSize = params.size if params.size else "normal" %} -{% set customClass = " " + params.customClass if params.customClass %} {# Allows custom classes to be added to loader #} +{% set classes = " " + params.classes if params.classes %} {# Allows custom classes to be added to loader #} -
Content is loading...
small
or large
."
+ },
+ {
+ "name": "classes",
+ "type": "string",
+ "description": "Classes to add to the loader component."
+ }
+ ]
+}
diff --git a/src/www/pages/components/loader/index.njk b/src/www/pages/components/loader/index.njk
deleted file mode 100644
index daddadff6..000000000
--- a/src/www/pages/components/loader/index.njk
+++ /dev/null
@@ -1,66 +0,0 @@
-{% extends "www/_layouts/layout-left-pane.njk" %}
-{% set pageTitle="Loader" %}
-{% from "www/_partials/component-example/component-example.njk" import compExample %}
-
-{% block content %}
-{# Loader #}
-
- By default you should aim to use the 'normal sized loader'.
- Only when the normal sized loader is not fit for purpose should you use the large or small sized loader.
-
Change the text within .wmnds-loader__content
from 'Content is loading...' to something that describes what it is you are loading, this will help with accessibility.
.wmnds-loader\_\_content
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 %}