-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WNMGDS-260] Consolidate code examples (#536)
* Combine alert examples * Move example wrapper class to docs scss * Combine badge and list * Combine button * Combine size variant examples with main example, change example copy to match declarative style * Put hint and error outside of legend * Combine inverse examples for ChoiceList * Combine inverse examples for Textfield * Add new focus,active,hover classes to buttons, and make examples consistent with USWDS * Add new example style for inverse code examples * Fix e2e tests
- Loading branch information
1 parent
bf8a769
commit 9df8c88
Showing
25 changed files
with
503 additions
and
471 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
36 changes: 19 additions & 17 deletions
36
packages/core/src/components/Alert/alert.example-additional.html
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,21 +1,23 @@ | ||
<div class="ds-c-alert"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<p class="ds-c-alert__text">{{lorem-s}}</p> | ||
<div class="example--wrapper"> | ||
<div class="ds-c-alert"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<p class="ds-c-alert__text">{{lorem-s}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-u-margin-top--2"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<p class="ds-c-alert__text">{{lorem-l}}</p> | ||
<div class="ds-c-alert"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<p class="ds-c-alert__text">{{lorem-l}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-u-margin-top--2"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<h3 class="ds-c-alert__heading">Status heading</h3> | ||
<p class="ds-c-alert__text">{{lorem-m}}</p> | ||
<ul class="ds-c-list"> | ||
<li>Alert list item</li> | ||
<li>Alert list item</li> | ||
</ul> | ||
<a href="javascript:void(0);">Link text</a> | ||
<div class="ds-c-alert"> | ||
<div class="ds-c-alert__body ds-u-measure--wide"> | ||
<h3 class="ds-c-alert__heading">Status heading</h3> | ||
<p class="ds-c-alert__text">{{lorem-m}}</p> | ||
<ul class="ds-c-list"> | ||
<li>Alert list item</li> | ||
<li>Alert list item</li> | ||
</ul> | ||
<a href="javascript:void(0);">Link text</a> | ||
</div> | ||
</div> | ||
</div> |
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,9 +1,47 @@ | ||
<div class="ds-c-alert {{modifier}}"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Status heading</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
<div class="example--wrapper"> | ||
<div class="ds-c-alert"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Informative status</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-c-alert--error"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Error status</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-c-alert--warn"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Warning status</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-c-alert--success"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Success status</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="ds-c-alert ds-c-alert--hide-icon"> | ||
<div class="ds-c-alert__body"> | ||
<h3 class="ds-c-alert__heading">Status without icon</h3> | ||
<p class="ds-c-alert__text"> | ||
Lorem ipsum dolor sit <a href="javascript:void(0);">link text</a>, | ||
consectetur adipiscing elit, sed do eiusmod. | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
<span class="ds-c-badge {{modifier}}">5</span> | ||
<span class="ds-c-badge {{modifier}}">Badge label</span> | ||
<span class="ds-c-badge {{modifier}} ds-u-font-size--base">Badge label</span> | ||
<div class="example--wrapper"> | ||
<div> | ||
<span class="ds-c-badge">1</span> | ||
<span class="ds-c-badge">Badge label</span> | ||
<span class="ds-c-badge ds-u-font-size--base">Larger badge label</span> | ||
</div> | ||
<div> | ||
<span class="ds-c-badge ds-c-badge--info">2</span> | ||
<span class="ds-c-badge ds-c-badge--info">Info badge</span> | ||
<span class="ds-c-badge ds-c-badge--info ds-u-font-size--base" | ||
>Larger info badge</span | ||
> | ||
</div> | ||
<div> | ||
<span class="ds-c-badge ds-c-badge--success">3</span> | ||
<span class="ds-c-badge ds-c-badge--success">Success badge</span> | ||
<span class="ds-c-badge ds-c-badge--success ds-u-font-size--base" | ||
>Larger success badge</span | ||
> | ||
</div> | ||
<div> | ||
<span class="ds-c-badge ds-c-badge--warn">4</span> | ||
<span class="ds-c-badge ds-c-badge--warn">Warning badge</span> | ||
<span class="ds-c-badge ds-c-badge--warn ds-u-font-size--base" | ||
>Larger warning badge</span | ||
> | ||
</div> | ||
<div> | ||
<span class="ds-c-badge ds-c-badge--alert">5</span> | ||
<span class="ds-c-badge ds-c-badge--alert">Alert badge</span> | ||
<span class="ds-c-badge ds-c-badge--alert ds-u-font-size--base" | ||
>Larger alert badge</span | ||
> | ||
</div> | ||
</div> |
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
Oops, something went wrong.