Skip to content

Commit

Permalink
docs(card): update demos
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Oct 22, 2023
1 parent cb57759 commit fa4e60d
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 236 deletions.
18 changes: 15 additions & 3 deletions elements/rh-card/demo/alignment.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<link rel="stylesheet" href="demo.css" />
<script type="module" src="rh-card.js"></script>

<rh-card>
<h2 slot="header">Default</h2>
<p>
Expand All @@ -10,6 +7,7 @@ <h2 slot="header">Default</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card alignment="start">
<h2 slot="header">Alignment Start</h2>
<p>
Expand All @@ -19,6 +17,7 @@ <h2 slot="header">Alignment Start</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card alignment="center">
<h2 slot="header">Alignment Center</h2>
<p>
Expand All @@ -28,6 +27,7 @@ <h2 slot="header">Alignment Center</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card alignment="end">
<h2 slot="header">Alignment End</h2>
<p>
Expand All @@ -37,6 +37,7 @@ <h2 slot="header">Alignment End</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card bar>
<h2 slot="header">Default</h2>
<p>
Expand All @@ -46,6 +47,7 @@ <h2 slot="header">Default</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card bar alignment="start">
<h2 slot="header">Alignment Start</h2>
<p>
Expand All @@ -55,6 +57,7 @@ <h2 slot="header">Alignment Start</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card bar alignment="center">
<h2 slot="header">Alignment Center</h2>
<p>
Expand All @@ -64,6 +67,7 @@ <h2 slot="header">Alignment Center</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<rh-card bar alignment="end">
<h2 slot="header">Alignment End</h2>
<p>
Expand All @@ -73,3 +77,11 @@ <h2 slot="header">Alignment End</h2>
</p>
<rh-cta priority="primary" slot="footer"><a href="#">call to action</a></rh-cta>
</rh-card>

<script type="module">
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/rh-avatar/rh-avatar.js';
import '@rhds/elements/rh-blockquote/rh-blockquote.js';
import '@rhds/elements/rh-card/rh-card.js';
</script>

25 changes: 16 additions & 9 deletions elements/rh-card/demo/color-context.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
<link rel="stylesheet" href="demo.css">

<script type="module" src="rh-card.js"></script>

<script type="module">
import '@rhds/elements/lib/elements/rh-context-picker/rh-context-picker.js';
import '@rhds/elements/lib/elements/rh-context-provider/rh-context-provider.js';
</script>

<rh-context-picker target="demo-container"></rh-context-picker>

<rh-context-provider id="demo-container">
Expand Down Expand Up @@ -134,3 +125,19 @@ <h2 slot="header">Heading, sm</h2>
</rh-card>
</figure>
</rh-context-provider>

<script type="module">
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/rh-avatar/rh-avatar.js';
import '@rhds/elements/rh-blockquote/rh-blockquote.js';
import '@rhds/elements/rh-card/rh-card.js';
import '@rhds/elements/lib/elements/rh-context-picker/rh-context-picker.js';
import '@rhds/elements/lib/elements/rh-context-provider/rh-context-provider.js';
</script>

<style>
[color-palette^="dark"] {
--_header-bg: var(--rh-color-surface-dark-alt, #292929);
--_alt-bg: #3c3f42;
}
</style>
68 changes: 0 additions & 68 deletions elements/rh-card/demo/demo.css

This file was deleted.

7 changes: 5 additions & 2 deletions elements/rh-card/demo/rh-card.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<link rel="stylesheet" href="demo.css">
<script type="module" src="rh-card.js"></script>
<rh-card>
<h2>Headline, sm</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Expand All @@ -10,3 +8,8 @@ <h2>Headline, sm</h2>
<a href="#">Call to action</a>
</rh-cta>
</rh-card>

<script type="module">
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/rh-card/rh-card.js';
</script>
9 changes: 0 additions & 9 deletions elements/rh-card/demo/rh-card.js

This file was deleted.

Loading

0 comments on commit fa4e60d

Please sign in to comment.