add class to material ui icon code example
Example 1: material-ui add icon to switch when on
import React from 'react';
import Switch from '@material-ui/core/Switch';
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
export default function App() {
return (
<Switch
checkedIcon={<AccountCircleIcon/>}
/>
);
}
Example 2: Material-ui account circle icon
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
// don't forget to import the icon dependancy
// npm install @material Ui/icons