getMuiIconBindings()
function getMuiIconBindings(options): Promise<Elements>;Defined in: icons.ts:24
Function to get MUI icons bindings based on the provided options.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | GetMuiIconBindingsOptions | An Object containing the options for getting the MUI icons bindings. See GetMuiIconBindingsOptions. |
Returns
Promise<Elements>
An Object containing the MUI icons bindings based on the provided options. The keys are the kebab-case version of the icon names, and the values are the corresponding MUI icons.
Remarks
We recommend using MUI's Icon Component instead. This function dynamically imports the MUI icons and filters them based on the specified variants. In a worst-case-scenario, it contains about 10k icons, which are hard to handle eagerly. This Function is designed to handle all icons in O(n) time complexity, where n is the total number of icons. By providing a MapNamesFn, time complexity will grow to O(2n) because the function needs to be applied to every icon.
Since
2.0.0
Author
Simon Kovtyk