|
| 1 | +<rh-announcement dismissable> |
| 2 | + <svg slot="image" |
| 3 | + width="80" |
| 4 | + height="48" |
| 5 | + role="img" |
| 6 | + aria-label="Sample image"> |
| 7 | + <rect fill="var(--rh-color-border-interactive)" |
| 8 | + fill-opacity="0.1" |
| 9 | + stroke="var(--rh-color-border-interactive)" |
| 10 | + stroke-width="2px" |
| 11 | + width="100%" |
| 12 | + height="100%" |
| 13 | + stroke-dasharray="4 4"> |
| 14 | + </rect> |
| 15 | + <text x="17" |
| 16 | + y="30" |
| 17 | + style="font-family: var(--rh-font-family-code, RedHatMono, 'Red Hat Mono', 'Courier New', Courier, monospace); font-size: var(--rh-font-size-body-text-md, 1rem);" |
| 18 | + fill="var(--rh-color-blue-50, #0066CC)"> |
| 19 | + Image |
| 20 | + </text> |
| 21 | + </svg> |
| 22 | + <p>Lorem ipsum dolor sit amet consectetur adipisicing elit ipsum dolor sit.</p> |
| 23 | + <rh-cta slot="cta" href="#">Learn More</rh-cta> |
| 24 | +</rh-announcement> |
| 25 | + |
| 26 | +<rh-announcement dismissable color-palette="dark" image-position="inline-start"> |
| 27 | + <svg slot="image" |
| 28 | + width="80" |
| 29 | + height="48" |
| 30 | + role="img" |
| 31 | + aria-label="Sample image"> |
| 32 | + <rect fill="var(--rh-color-gray-60, #4D4D4D)" |
| 33 | + stroke="var(--rh-color-border-subtle)" |
| 34 | + stroke-width="2px" |
| 35 | + width="100%" |
| 36 | + height="100%" |
| 37 | + stroke-dasharray="4 4"> |
| 38 | + </rect> |
| 39 | + <text x="17" |
| 40 | + y="30" |
| 41 | + style="font-family: var(--rh-font-family-code, RedHatMono, 'Red Hat Mono', 'Courier New', Courier, monospace); font-size: var(--rh-font-size-body-text-md, 1rem);" |
| 42 | + fill="var(--rh-color-text-secondary)"> |
| 43 | + Image |
| 44 | + </text> |
| 45 | + </svg> |
| 46 | + <p>An announcement with <code>inline-start</code> for the value of <code>image position</code>.</p> |
| 47 | + <rh-cta slot="cta" href="#">Learn More</rh-cta> |
| 48 | +</rh-announcement> |
| 49 | + |
| 50 | +<rh-announcement dismissable image-position="block-start"> |
| 51 | + <svg slot="image" |
| 52 | + width="80" |
| 53 | + height="48" |
| 54 | + role="img" |
| 55 | + aria-label="Sample image"> |
| 56 | + <rect fill="var(--rh-color-border-interactive)" |
| 57 | + fill-opacity="0.1" |
| 58 | + stroke="var(--rh-color-border-interactive)" |
| 59 | + stroke-width="2px" |
| 60 | + width="100%" |
| 61 | + height="100%" |
| 62 | + stroke-dasharray="4 4"> |
| 63 | + </rect> |
| 64 | + <text x="17" |
| 65 | + y="30" |
| 66 | + style="font-family: var(--rh-font-family-code, RedHatMono, 'Red Hat Mono', 'Courier New', Courier, monospace); font-size: var(--rh-font-size-body-text-md, 1rem);" |
| 67 | + fill="var(--rh-color-blue-50, #0066CC)"> |
| 68 | + Image |
| 69 | + </text> |
| 70 | + </svg> |
| 71 | + <p>An announcement with <code>block-start</code> for the value of <code>image position</code>.</p> |
| 72 | + <rh-cta slot="cta" href="#">Learn More</rh-cta> |
| 73 | +</rh-announcement> |
| 74 | + |
| 75 | +<link rel="stylesheet" href="../rh-announcement-lightdom-shim.css"> |
| 76 | + |
| 77 | +<script type="module"> |
| 78 | + import '@rhds/elements/rh-cta/rh-cta.js'; |
| 79 | + import '@rhds/elements/rh-announcement/rh-announcement.js'; |
| 80 | +</script> |
0 commit comments