-
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.
* convert to markdown * add examples + properties * convert to markdown * add examples + properties * added help examples + props * remove brs * fix examples * update params * amendsd prop descriptions * remove njk trim/indents * reorder example props Co-authored-by: Catia Costa <[email protected]> Co-authored-by: Dayle Salmon <[email protected]>
- Loading branch information
1 parent
05bd895
commit adc7037
Showing
11 changed files
with
334 additions
and
177 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,11 @@ | ||
{% raw %} | ||
{% from "wmnds/components/message/summary/_summary.njk" import wmndsMsgHelp %} | ||
{{ | ||
wmndsMsgHelp({ | ||
contentText: "Details added what happened and what to do next. Lorem ipsum lorem ipsum. Lorem ipsum lorem ipsum text.", | ||
contentHTML: null, | ||
dismissable: false | ||
}) | ||
}} | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
{% macro wmndsMsgHelp(params) %} | ||
{% from "wmnds/components/icon/_icon.njk" import wmndsIcon %} | ||
{# Set vars and defaults #} | ||
{# Set content #} | ||
{% set _content = params.contentHTML | safe if params.contentHTML else params.contentText %} | ||
{% set dismissable = params.dismissable if params.dismissable === false else true %} | ||
|
||
<div class="wmnds-msg-help"> | ||
{% if dismissable %} | ||
<button class="wmnds-msg-help__close-btn" aria-label="Close help message"> | ||
{# Get SVG icon #} | ||
{{- | ||
wmndsIcon({ | ||
icon: 'general-cross', | ||
class: 'wmnds-msg-help__close-icon' | ||
}) | indent(4) | trim | ||
}) | ||
}} | ||
</button> | ||
{{ params.message | safe }} | ||
{% endif %} | ||
{{ _content }} | ||
</div> | ||
|
||
{% endmacro %} |
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,19 @@ | ||
{ | ||
"wmndsMsgHelpProps": [ | ||
{ | ||
"name": "contentText", | ||
"type": "string", | ||
"description": "<strong>Required.</strong> The text that displays in the help message component. You can use any string with this option. If you set <code class='wmnds-website-inline-code'>contentHTML</code>, this option is not required and is ignored." | ||
}, | ||
{ | ||
"name": "contentHTML", | ||
"type": "string", | ||
"description": "<strong>Required.</strong> The HTML to use within the help message component. You can use any string with this option. If you set <code class='wmnds-website-inline-code'>contentHTML</code>, <code class='wmnds-website-inline-code'>contentText</code> is not required and is ignored." | ||
}, | ||
{ | ||
"name": "dismissable", | ||
"type": "boolean", | ||
"description": "If dismissable is set to true, the component will display a close icon. Defaults to <code class='wmnds-website-inline-code'>true</code>" | ||
} | ||
] | ||
} |
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,15 @@ | ||
{% raw %} | ||
{% from "wmnds/components/message/summary/_summary.njk" import wmndsMsgSummary %} | ||
{{ | ||
wmndsMsgSummary({ | ||
type: "info", | ||
title: "Information about XXXXXXXXX was successfully updated!", | ||
subtitle: null, | ||
contentText: "Details added what happened and what to do next. Lorem ipsum lorem ipsum. Lorem ipsum lorem ipsum text.", | ||
contentHTML: null, | ||
dismissable: false, | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"wmndsMsgSummaryProps": [ | ||
{ | ||
"name": "type", | ||
"type": "string", | ||
"description": "Type of the message component. As default it is <code class='wmnds-website-inline-code'>info</code>. Available types: <code class='wmnds-website-inline-code'>info</code>, <code class='wmnds-website-inline-code'>success</code>, <code class='wmnds-website-inline-code'>success-fill-no-icon</code>, <code class='wmnds-website-inline-code'>warning</code>, <code class='wmnds-website-inline-code'>error</code>" | ||
}, | ||
{ | ||
"name": "title", | ||
"type": "string", | ||
"description": "The title text for the message displayed as <code class='wmnds-website-inline-code'>h3</code>." | ||
}, | ||
{ | ||
"name": "subtitle", | ||
"type": "string", | ||
"description": "The subtitle text for the message." | ||
}, | ||
{ | ||
"name": "contentText", | ||
"type": "string", | ||
"description": "<strong>Required.</strong> The text that displays in the message component. You can use any string with this option. If you set <code class='wmnds-website-inline-code'>contentHTML</code>, this option is not required and is ignored." | ||
}, | ||
{ | ||
"name": "contentHTML", | ||
"type": "string", | ||
"description": "<strong>Required.</strong> The HTML to use within the message component. You can use any string with this option. If you set <code class='wmnds-website-inline-code'>contentHTML</code>, <code class='wmnds-website-inline-code'>contentText</code> is not required and is ignored." | ||
}, | ||
{ | ||
"name": "dismissable", | ||
"type": "boolean", | ||
"description": "If dismissable is set to true, the component will display a close icon." | ||
}, | ||
{ | ||
"name": "classes", | ||
"type": "string", | ||
"description": "Classes to add to the summary container." | ||
} | ||
] | ||
} |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.