You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Copy file name to clipboardexpand all lines: packages/mdc-chips/README.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,10 @@ Property | Value Type | Description
190
190
191
191
#### `MDCChipSet`
192
192
193
+
Method Signature | Description
194
+
--- | ---
195
+
`addChip(text: string, leadingIcon: Element, trailingIcon: Element) => void` | Creates a new chip in the chip set with the given text, leading icon, and trailing icon
196
+
193
197
Property | Value Type | Description
194
198
--- | --- | ---
195
199
`chips` | Array<`MDCChip`> | An array of the `MDCChip` objects that represent chips in the set
`hasClass(className: string) => boolean` | Returns whether the chip set element has the given class
223
-
`registerInteractionHandler(evtType, handler) => void` | Registers an event handler on the root element for a given event
224
-
`deregisterInteractionHandler(evtType, handler) => void` | Deregisters an event handler on the root element for a given event
227
+
`registerInteractionHandler(evtType: string, handler: EventListener) => void` | Registers an event handler on the root element for a given event
228
+
`deregisterInteractionHandler(evtType: string, handler: EventListener) => void` | Deregisters an event handler on the root element for a given event
229
+
`createChipElement(text: string, leadingIcon: Element, trailingIcon: Element) => Element` | Returns a chip element with the given text, leading icon, and trailing icon
230
+
`appendChild(el: Element) => void` | Appends the given element as a child of the root element
225
231
226
232
### Foundations: `MDCChipFoundation` and `MDCChipSetFoundation`
`addChip(text: string, leadingIcon: Element, trailingIcon: Element) => Element` | Returns a new chip element with the given text, leading icon, and trailing icon, added to the root chip set element
239
246
`select(chipFoundation: MDCChipFoundation) => void` | Selects the given chip
240
247
`deselect(chipFoundation: MDCChipFoundation) => void` | Deselects the given chip
0 commit comments