|
1 | 1 | <!doctype html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
| 4 | + <meta name="viewport" content="width=device-width, initial-scale=1"/> |
4 | 5 | <title>makeup-switch-element</title> |
5 | 6 | <link href="../makeup-switch-style/docs.css" rel="stylesheet" /> |
6 | 7 | <!-- <link href="../makeup-switch-style/theme-1.css" rel="stylesheet" /> --> |
|
12 | 13 | <h1>makeup-switch-element</h1> |
13 | 14 | </header> |
14 | 15 | <main> |
| 16 | + <h2>Declarative</h2> |
15 | 17 | <ul> |
16 | 18 | <li> |
17 | 19 | <span id="label1">makeup-switch 1</span> |
18 | | - <makeup-switch labelledby="label1" placeholder="true"></makeup-switch> |
| 20 | + <makeup-switch labelledby="label1"> |
| 21 | + <template shadowrootmode="open"> |
| 22 | + <link href="../makeup-switch-style/switch.css" rel="stylesheet" /> |
| 23 | + <span class="switch"> |
| 24 | + <span class="switch__control" role="switch" tabindex="0"></span> |
| 25 | + <span class="switch__button"></span> |
| 26 | + </span> |
| 27 | + </template> |
| 28 | + </makeup-switch> |
19 | 29 | </li> |
20 | 30 | <li> |
21 | 31 | <span id="label2">makeup-switch 2</span> |
22 | | - <makeup-switch labelledby="label2" placeholder="true" checked></makeup-switch> |
| 32 | + <makeup-switch labelledby="label2" checked> |
| 33 | + <template shadowrootmode="open"> |
| 34 | + <link href="../makeup-switch-style/switch.css" rel="stylesheet" /> |
| 35 | + <span class="switch"> |
| 36 | + <span class="switch__control" role="switch" tabindex="0"></span> |
| 37 | + <span class="switch__button"></span> |
| 38 | + </span> |
| 39 | + </template> |
| 40 | + </makeup-switch> |
23 | 41 | </li> |
24 | 42 | <li> |
25 | 43 | <span id="label3">makeup-switch 3</span> |
26 | | - <makeup-switch labelledby="label3" placeholder="true" disabled></makeup-switch> |
| 44 | + <makeup-switch labelledby="label3" disabled> |
| 45 | + <template shadowrootmode="open"> |
| 46 | + <link href="../makeup-switch-style/switch.css" rel="stylesheet" /> |
| 47 | + <span class="switch"> |
| 48 | + <span class="switch__control" role="switch" tabindex="0"></span> |
| 49 | + <span class="switch__button"></span> |
| 50 | + </span> |
| 51 | + </template> |
| 52 | + </makeup-switch> |
27 | 53 | </li> |
28 | 54 | <li> |
29 | 55 | <span id="label4">makeup-switch 4</span> |
30 | | - <makeup-switch labelledby="label4" placeholder="true" checked disabled></makeup-switch> |
| 56 | + <makeup-switch labelledby="label4" checked disabled> |
| 57 | + <template shadowrootmode="open"> |
| 58 | + <link href="../makeup-switch-style/switch.css" rel="stylesheet" /> |
| 59 | + <span class="switch"> |
| 60 | + <span class="switch__control" role="switch" tabindex="0"></span> |
| 61 | + <span class="switch__button"></span> |
| 62 | + </span> |
| 63 | + </template> |
| 64 | + </makeup-switch> |
| 65 | + </li> |
| 66 | + </ul> |
| 67 | + |
| 68 | + <h2>Imperative</h2> |
| 69 | + <ul> |
| 70 | + <li> |
| 71 | + <span id="label5">makeup-switch 5</span> |
| 72 | + <makeup-switch labelledby="label5" placeholder="true"></makeup-switch> |
| 73 | + </li> |
| 74 | + <li> |
| 75 | + <span id="label6">makeup-switch 6</span> |
| 76 | + <makeup-switch labelledby="label6" placeholder="true" checked></makeup-switch> |
| 77 | + </li> |
| 78 | + <li> |
| 79 | + <span id="label7">makeup-switch 7</span> |
| 80 | + <makeup-switch labelledby="label7" placeholder="true" disabled></makeup-switch> |
| 81 | + </li> |
| 82 | + <li> |
| 83 | + <span id="label8">makeup-switch 8</span> |
| 84 | + <makeup-switch labelledby="label8" placeholder="true" checked disabled></makeup-switch> |
31 | 85 | </li> |
32 | 86 | </ul> |
33 | 87 | </main> |
|
0 commit comments