|
1 | 1 | import { html } from "lit"; |
2 | | - |
| 2 | +import { styleMap } from "lit/directives/style-map.js"; |
3 | 3 | import { Template } from "./template"; |
4 | 4 |
|
5 | 5 | /** |
@@ -58,29 +58,72 @@ export default { |
58 | 58 | }, |
59 | 59 | }; |
60 | 60 |
|
61 | | -export const Default = (args) => html` |
62 | | - <div> |
| 61 | +export const Default = (args, context) => html` |
| 62 | + <div style=${styleMap({ |
| 63 | + display: "flex", |
| 64 | + flexDirection: "column", |
| 65 | + alignItems: "flex-start", |
| 66 | + gap: "1rem", |
| 67 | + "--mod-detail-margin-end": ".3rem", |
| 68 | + })}> |
63 | 69 | ${Template({ |
64 | 70 | ...args |
65 | 71 | })} |
66 | 72 |
|
67 | 73 | ${ |
68 | 74 | window.isChromatic() ? |
69 | | - Template({ |
70 | | - ...args, |
71 | | - headerText: "in-line alert header announcing something very long and in-line", |
72 | | - text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
73 | | - customStyles: {"max-width": "400px"} |
74 | | - }) |
75 | | - && |
76 | | - Template({ |
77 | | - ...args, |
78 | | - headerText: "in-line alert header announcing something very long and in-line", |
79 | | - text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
80 | | - customStyles: {"max-width": "400px"}, |
81 | | - variant: "notice", |
82 | | - isClosable: true, |
83 | | - }) |
| 75 | + html` |
| 76 | + <div style=${styleMap({ |
| 77 | + display: "flex", |
| 78 | + alignItems: "flex-start", |
| 79 | + flexDirection: "column", |
| 80 | + gap: "1rem", |
| 81 | + "--mod-detail-margin-end": ".3rem", |
| 82 | + })}> |
| 83 | + ${Template({ |
| 84 | + ...args, |
| 85 | + headerText: "in-line alert header announcing something very long and in-line", |
| 86 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 87 | + customStyles: {"max-width": "400px"} |
| 88 | + }, context)} |
| 89 | + ${Template({ |
| 90 | + ...args, |
| 91 | + headerText: "in-line alert header announcing something very long and in-line", |
| 92 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 93 | + variant: "info", |
| 94 | + customStyles: {"max-width": "400px"}, |
| 95 | + }, context)} |
| 96 | + ${Template({ |
| 97 | + ...args, |
| 98 | + headerText: "in-line alert header announcing something very long and in-line", |
| 99 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 100 | + variant: "negative", |
| 101 | + customStyles: {"max-width": "400px"}, |
| 102 | + }, context)} |
| 103 | + ${Template({ |
| 104 | + ...args, |
| 105 | + headerText: "in-line alert header announcing something very long and in-line", |
| 106 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 107 | + variant: "positive", |
| 108 | + customStyles: {"max-width": "400px"}, |
| 109 | + }, context)} |
| 110 | + ${Template({ |
| 111 | + ...args, |
| 112 | + headerText: "in-line alert header announcing something very long and in-line", |
| 113 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 114 | + variant: "notice", |
| 115 | + customStyles: {"max-width": "400px"}, |
| 116 | + }, context)} |
| 117 | + ${Template({ |
| 118 | + ...args, |
| 119 | + headerText: "closable alert header announcing something very long and in-line", |
| 120 | + text: "this is a very urgent alert with a lot of context, so the text has to wrap", |
| 121 | + customStyles: {"max-width": "400px"}, |
| 122 | + variant: "positive", |
| 123 | + isClosable: true, |
| 124 | + }, context)} |
| 125 | + </div> |
| 126 | + ` |
84 | 127 | : null |
85 | 128 | } |
86 | 129 | </div> |
|
0 commit comments