@@ -46,13 +46,17 @@ npm install @material/chips
46
46
<div class =" mdc-chip" role =" row" >
47
47
<div class =" mdc-chip__ripple" ></div >
48
48
<span role =" gridcell" >
49
- <span role =" button" tabindex =" 0" class =" mdc-chip__text" >Chip One</span >
49
+ <span role =" button" tabindex =" 0" class =" mdc-chip__primary-action" >
50
+ <span class =" mdc-chip__text" >Chip One</span >
51
+ </span >
50
52
</span >
51
53
</div >
52
54
<div class =" mdc-chip" role =" row" >
53
55
<div class =" mdc-chip__ripple" ></div >
54
56
<span role =" gridcell" >
55
- <span role =" button" tabindex =" -1" class =" mdc-chip__text" >Chip Two</span >
57
+ <span role =" button" tabindex =" -1" class =" mdc-chip__primary-action" >
58
+ <span class =" mdc-chip__text" >Chip Two</span >
59
+ </span >
56
60
</span >
57
61
</div >
58
62
...
@@ -98,7 +102,9 @@ However, you can also use SVG, [Font Awesome](https://fontawesome.com/), or any
98
102
<div class =" mdc-chip__ripple" ></div >
99
103
<i class =" material-icons mdc-chip__icon mdc-chip__icon--leading" >event</i >
100
104
<span role =" gridcell" >
101
- <span role =" button" tabindex =" 0" class =" mdc-chip__text" >Add to calendar</span >
105
+ <span role =" button" tabindex =" 0" class =" mdc-chip__primary-action" >
106
+ <span class =" mdc-chip__text" >Add to calendar</span >
107
+ </span >
102
108
</span >
103
109
</div >
104
110
```
@@ -111,7 +117,9 @@ A trailing icon comes with the functionality to remove the chip from the set. If
111
117
<div class =" mdc-chip" role =" row" >
112
118
<div class =" mdc-chip__ripple" ></div >
113
119
<span role =" gridcell" >
114
- <span role =" button" tabindex =" 0" class =" mdc-chip__text" >Jane Smith</span >
120
+ <span role =" button" tabindex =" 0" class =" mdc-chip__primary-action" >
121
+ <span class =" mdc-chip__text" >Jane Smith</span >
122
+ </span >
115
123
</span >
116
124
<span role =" gridcell" >
117
125
<i class =" material-icons mdc-chip__icon mdc-chip__icon--trailing" tabindex =" -1" role =" button" >cancel</i >
@@ -144,9 +152,11 @@ Filter chips are a variant of chips which allow multiple selection from a set of
144
152
</svg >
145
153
</span >
146
154
<span role =" gridcell" >
147
- <span role =" checkbox" tabindex =" 0" aria-checked =" false" class =" mdc-chip__text" >Filterable content</span >
155
+ <span role =" checkbox" tabindex =" 0" aria-checked =" false" class =" mdc-chip__primary-action" >
156
+ <span class =" mdc-chip__text" >Filterable content</span >
157
+ </span >
148
158
</span >
149
- </button >
159
+ </div >
150
160
...
151
161
</div >
152
162
```
@@ -165,7 +175,9 @@ To use a leading icon in a filter chip, put the `mdc-chip__icon--leading` elemen
165
175
</svg >
166
176
</span >
167
177
<span role =" gridcell" >
168
- <span role =" checkbox" tabindex =" 0" aria-checked =" false" class =" mdc-chip__text" >Filterable content</span >
178
+ <span role =" checkbox" tabindex =" 0" aria-checked =" false" class =" mdc-chip__primary-action" >
179
+ <span class =" mdc-chip__text" >Filterable content</span >
180
+ </span >
169
181
</span >
170
182
</div >
171
183
...
@@ -223,7 +235,9 @@ To display a pre-selected filter or choice chip, add the class `mdc-chip--select
223
235
<div class =" mdc-chip mdc-chip--selected" role =" row" >
224
236
<div class =" mdc-chip__ripple" ></div >
225
237
<span role =" gridcell" >
226
- <span role =" radio" tabindex =" 0" aria-checked =" true" class =" mdc-chip__text" >Add to calendar</span >
238
+ <span role =" radio" tabindex =" 0" aria-checked =" true" class =" mdc-chip__primary-action" >
239
+ <span class =" mdc-chip__text" >Add to calendar</span >
240
+ </span >
227
241
</span >
228
242
</div >
229
243
</div >
@@ -243,7 +257,9 @@ To pre-select filter chips that have a leading icon, also add the class `mdc-chi
243
257
</svg >
244
258
</span >
245
259
<span role =" gridcell" >
246
- <span role =" checkbox" tabindex =" 0" aria-checked =" true" class =" mdc-chip__text" >Filterable content</span >
260
+ <span role =" checkbox" tabindex =" 0" aria-checked =" true" class =" mdc-chip__primary-action" >
261
+ <span class =" mdc-chip__text" >Filterable content</span >
262
+ </span >
247
263
</span >
248
264
</div >
249
265
</div >
@@ -258,13 +274,15 @@ To meet this requirement, add the following to your chip:
258
274
259
275
``` html
260
276
<div class =" mdc-touch-target-wrapper" >
261
- <button class =" mdc-chip mdc-chip--touch" >
277
+ <div class =" mdc-chip mdc-chip--touch" >
262
278
<div class =" mdc-chip__ripple" ></div >
263
279
<span role =" gridcell" >
264
- <span role =" button" tabindex =" 0" class =" mdc-chip__text" >Chip One</span >
280
+ <span role =" button" tabindex =" 0" class =" mdc-chip__primary-action" >
281
+ <div class =" mdc-chip__touch" ></div >
282
+ <span class =" mdc-chip__text" >Chip One</span >
283
+ </span >
265
284
</span >
266
- <div class =" mdc-chip__touch" ></div >
267
- </button >
285
+ </div >
268
286
</div >
269
287
```
270
288
0 commit comments