|
12 | 12 | <script src="../../../../../scripts/testing/scripts.js"></script> |
13 | 13 | <script nomodule src="../../../../../dist/ionic/ionic.js"></script> |
14 | 14 | <script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script> |
| 15 | + |
| 16 | + <style> |
| 17 | + .container { |
| 18 | + display: grid; |
| 19 | + grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); |
| 20 | + } |
| 21 | + |
| 22 | + ion-button { |
| 23 | + margin: 8px 4px; |
| 24 | + } |
| 25 | + </style> |
15 | 26 | </head> |
16 | 27 |
|
17 | 28 | <body> |
|
23 | 34 | </ion-header> |
24 | 35 |
|
25 | 36 | <ion-content class="ion-padding ion-text-center" id="content" no-bounce> |
26 | | - <p> |
27 | | - <ion-button id="default">Default</ion-button> |
28 | | - <ion-button class="ion-focused">Default.focused</ion-button> |
29 | | - <ion-button class="ion-activated">Default.activated</ion-button> |
30 | | - </p> |
31 | | - |
32 | | - <p> |
33 | | - <ion-button color="primary">Primary</ion-button> |
34 | | - <ion-button class="ion-focused" color="primary">Primary.focused</ion-button> |
35 | | - <ion-button class="ion-activated" color="primary">Primary.activated</ion-button> |
36 | | - </p> |
37 | | - |
38 | | - <p> |
39 | | - <ion-button color="secondary">Secondary</ion-button> |
40 | | - <ion-button class="ion-focused" color="secondary">Secondary.focused</ion-button> |
41 | | - <ion-button class="ion-activated" color="secondary">Secondary.activated</ion-button> |
42 | | - </p> |
43 | | - |
44 | | - <p> |
45 | | - <ion-button color="tertiary">Tertiary</ion-button> |
46 | | - <ion-button class="ion-focused" color="tertiary">Tertiary.focused</ion-button> |
47 | | - <ion-button class="ion-activated" color="tertiary">Tertiary.activated</ion-button> |
48 | | - </p> |
49 | | - |
50 | | - <p> |
51 | | - <ion-button color="success">Success</ion-button> |
52 | | - <ion-button class="ion-focused" color="success">Success.focused</ion-button> |
53 | | - <ion-button class="ion-activated" color="success">Success.activated</ion-button> |
54 | | - </p> |
55 | | - |
56 | | - <p> |
57 | | - <ion-button color="warning">Warning</ion-button> |
58 | | - <ion-button class="ion-focused" color="warning">Warning.focused</ion-button> |
59 | | - <ion-button class="ion-activated" color="warning">Warning.activated</ion-button> |
60 | | - </p> |
61 | | - |
62 | | - <p> |
63 | | - <ion-button color="danger">Danger</ion-button> |
64 | | - <ion-button class="ion-focused" color="danger">Danger.focused</ion-button> |
65 | | - <ion-button class="ion-activated" color="danger">Danger.activated</ion-button> |
66 | | - </p> |
67 | | - |
68 | | - <p> |
69 | | - <ion-button color="light">Light</ion-button> |
70 | | - <ion-button class="ion-focused" color="light">Light.focused</ion-button> |
71 | | - <ion-button class="ion-activated" color="light">Light.activated</ion-button> |
72 | | - </p> |
73 | | - |
74 | | - <p> |
75 | | - <ion-button color="medium">Medium</ion-button> |
76 | | - <ion-button class="ion-focused" color="medium">Medium.focused</ion-button> |
77 | | - <ion-button class="ion-activated" color="medium">Medium.activated</ion-button> |
78 | | - </p> |
79 | | - |
80 | | - <p> |
81 | | - <ion-button color="dark">Dark</ion-button> |
82 | | - <ion-button class="ion-focused" color="dark">Dark.focused</ion-button> |
83 | | - <ion-button class="ion-activated" color="dark">Dark.activated</ion-button> |
84 | | - </p> |
85 | | - |
86 | | - <p> |
87 | | - <ion-button style="--opacity: 0.2">Opacity: 0.2</ion-button> |
88 | | - </p> |
89 | | - |
90 | | - <p> |
91 | | - <ion-button expand="block" id="disabledButton" disabled>Button Disabled</ion-button> |
92 | | - <ion-button expand="block" color="secondary" disabled>Secondary Disabled</ion-button> |
93 | | - <ion-button expand="block" color="tertiary" style="--opacity: 1" disabled>Disabled opacity: 1</ion-button> |
94 | | - </p> |
95 | | - |
96 | | - <p> |
97 | | - <ion-button expand="block" onclick="toggleDisabled()">Toggle Disabled</ion-button> |
98 | | - </p> |
99 | | - |
100 | | - <p> |
101 | | - <ion-button id="dynamicColor1" onclick="changeColor(event)">Change Color</ion-button> |
102 | | - <ion-button id="dynamicColor2" onclick="changeColor(event)" fill="outline">Change Color</ion-button> |
103 | | - </p> |
| 37 | + <div class="container"> |
| 38 | + <div class="item"> |
| 39 | + <h2>Bold (default) Buttons</h2> |
| 40 | + |
| 41 | + <p> |
| 42 | + <ion-button id="default">Default</ion-button> |
| 43 | + <ion-button class="ion-focused">Default.focused</ion-button> |
| 44 | + <ion-button class="ion-activated">Default.activated</ion-button> |
| 45 | + </p> |
| 46 | + |
| 47 | + <p> |
| 48 | + <ion-button color="primary">Primary</ion-button> |
| 49 | + <ion-button class="ion-focused" color="primary">Primary.focused</ion-button> |
| 50 | + <ion-button class="ion-activated" color="primary">Primary.activated</ion-button> |
| 51 | + </p> |
| 52 | + |
| 53 | + <p> |
| 54 | + <ion-button color="secondary">Secondary</ion-button> |
| 55 | + <ion-button class="ion-focused" color="secondary">Secondary.focused</ion-button> |
| 56 | + <ion-button class="ion-activated" color="secondary">Secondary.activated</ion-button> |
| 57 | + </p> |
| 58 | + |
| 59 | + <p> |
| 60 | + <ion-button color="tertiary">Tertiary</ion-button> |
| 61 | + <ion-button class="ion-focused" color="tertiary">Tertiary.focused</ion-button> |
| 62 | + <ion-button class="ion-activated" color="tertiary">Tertiary.activated</ion-button> |
| 63 | + </p> |
| 64 | + |
| 65 | + <p> |
| 66 | + <ion-button color="success">Success</ion-button> |
| 67 | + <ion-button class="ion-focused" color="success">Success.focused</ion-button> |
| 68 | + <ion-button class="ion-activated" color="success">Success.activated</ion-button> |
| 69 | + </p> |
| 70 | + |
| 71 | + <p> |
| 72 | + <ion-button color="warning">Warning</ion-button> |
| 73 | + <ion-button class="ion-focused" color="warning">Warning.focused</ion-button> |
| 74 | + <ion-button class="ion-activated" color="warning">Warning.activated</ion-button> |
| 75 | + </p> |
| 76 | + |
| 77 | + <p> |
| 78 | + <ion-button color="danger">Danger</ion-button> |
| 79 | + <ion-button class="ion-focused" color="danger">Danger.focused</ion-button> |
| 80 | + <ion-button class="ion-activated" color="danger">Danger.activated</ion-button> |
| 81 | + </p> |
| 82 | + |
| 83 | + <p> |
| 84 | + <ion-button color="light">Light</ion-button> |
| 85 | + <ion-button class="ion-focused" color="light">Light.focused</ion-button> |
| 86 | + <ion-button class="ion-activated" color="light">Light.activated</ion-button> |
| 87 | + </p> |
| 88 | + |
| 89 | + <p> |
| 90 | + <ion-button color="medium">Medium</ion-button> |
| 91 | + <ion-button class="ion-focused" color="medium">Medium.focused</ion-button> |
| 92 | + <ion-button class="ion-activated" color="medium">Medium.activated</ion-button> |
| 93 | + </p> |
| 94 | + |
| 95 | + <p> |
| 96 | + <ion-button color="dark">Dark</ion-button> |
| 97 | + <ion-button class="ion-focused" color="dark">Dark.focused</ion-button> |
| 98 | + <ion-button class="ion-activated" color="dark">Dark.activated</ion-button> |
| 99 | + </p> |
| 100 | + </div> |
| 101 | + |
| 102 | + <div class="item"> |
| 103 | + <h2>Subtle Buttons</h2> |
| 104 | + |
| 105 | + <p> |
| 106 | + <ion-button hue="subtle" id="default">Default</ion-button> |
| 107 | + <ion-button hue="subtle" class="ion-focused">Default.focused</ion-button> |
| 108 | + <ion-button hue="subtle" class="ion-activated">Default.activated</ion-button> |
| 109 | + </p> |
| 110 | + |
| 111 | + <p> |
| 112 | + <ion-button hue="subtle" color="primary">Primary</ion-button> |
| 113 | + <ion-button hue="subtle" color="primary" class="ion-focused">Primary.focused</ion-button> |
| 114 | + <ion-button hue="subtle" color="primary" class="ion-activated">Primary.activated</ion-button> |
| 115 | + </p> |
| 116 | + |
| 117 | + <p> |
| 118 | + <ion-button hue="subtle" color="secondary">Secondary</ion-button> |
| 119 | + <ion-button hue="subtle" class="ion-focused" color="secondary">Secondary.focused</ion-button> |
| 120 | + <ion-button hue="subtle" class="ion-activated" color="secondary">Secondary.activated</ion-button> |
| 121 | + </p> |
| 122 | + |
| 123 | + <p> |
| 124 | + <ion-button hue="subtle" color="tertiary">Tertiary</ion-button> |
| 125 | + <ion-button hue="subtle" class="ion-focused" color="tertiary">Tertiary.focused</ion-button> |
| 126 | + <ion-button hue="subtle" class="ion-activated" color="tertiary">Tertiary.activated</ion-button> |
| 127 | + </p> |
| 128 | + |
| 129 | + <p> |
| 130 | + <ion-button hue="subtle" color="success">Success</ion-button> |
| 131 | + <ion-button hue="subtle" color="success" class="ion-focused">Success.focused</ion-button> |
| 132 | + <ion-button hue="subtle" color="success" class="ion-activated">Success.activated</ion-button> |
| 133 | + </p> |
| 134 | + |
| 135 | + <p> |
| 136 | + <ion-button hue="subtle" color="warning">Warning</ion-button> |
| 137 | + <ion-button hue="subtle" color="warning" class="ion-focused">Warning.focused</ion-button> |
| 138 | + <ion-button hue="subtle" color="warning" class="ion-activated">Warning.activated</ion-button> |
| 139 | + </p> |
| 140 | + |
| 141 | + <p> |
| 142 | + <ion-button hue="subtle" color="danger">Danger</ion-button> |
| 143 | + <ion-button hue="subtle" color="danger" class="ion-focused">Danger.focused</ion-button> |
| 144 | + <ion-button hue="subtle" color="danger" class="ion-activated">Danger.activated</ion-button> |
| 145 | + </p> |
| 146 | + |
| 147 | + <p> |
| 148 | + <ion-button hue="subtle" color="light">Light</ion-button> |
| 149 | + <ion-button hue="subtle" color="light" class="ion-focused">Light.focused</ion-button> |
| 150 | + <ion-button hue="subtle" color="light" class="ion-activated">Light.activated</ion-button> |
| 151 | + </p> |
| 152 | + |
| 153 | + <p> |
| 154 | + <ion-button hue="subtle" color="medium">Medium</ion-button> |
| 155 | + <ion-button hue="subtle" color="medium" class="ion-focused">Medium.focused</ion-button> |
| 156 | + <ion-button hue="subtle" color="medium" class="ion-activated">Medium.activated</ion-button> |
| 157 | + </p> |
| 158 | + |
| 159 | + <p> |
| 160 | + <ion-button hue="subtle" color="dark">Dark</ion-button> |
| 161 | + <ion-button hue="subtle" color="dark" class="ion-focused">Dark.focused</ion-button> |
| 162 | + <ion-button hue="subtle" color="dark" class="ion-activated">Dark.activated</ion-button> |
| 163 | + </p> |
| 164 | + </div> |
| 165 | + </div> |
104 | 166 | </ion-content> |
105 | 167 | </ion-app> |
106 | | - |
107 | | - <script> |
108 | | - testingColors = ['primary', 'secondary', 'danger', 'dark']; |
109 | | - testingColorIndex = { |
110 | | - dynamicColor1: 0, |
111 | | - dynamicColor2: 0, |
112 | | - }; |
113 | | - |
114 | | - function changeColor(ev) { |
115 | | - el = ev.currentTarget; |
116 | | - |
117 | | - testingColorIndex[el.id] = |
118 | | - testingColorIndex[el.id] >= testingColors.length - 1 ? 0 : testingColorIndex[el.id] + 1; |
119 | | - newColor = testingColors[testingColorIndex[el.id]]; |
120 | | - |
121 | | - el.color = newColor; |
122 | | - } |
123 | | - |
124 | | - function toggleDisabled() { |
125 | | - var buttonEl = document.getElementById('disabledButton'); |
126 | | - buttonEl.disabled = !buttonEl.disabled; |
127 | | - } |
128 | | - </script> |
129 | 168 | </body> |
130 | 169 | </html> |
0 commit comments