title: How to change the collapse/expand icon to right side of TreeView of material?
body: <p>I am trying to implement a tree using the material in Reactjs. But, according to my design, the button to collapse and expand should be on the right side.</p>
  
  <p>Also, I am getting an error when added an icon in <code>TreeItem</code> like this:</p>
  
  <pre><code>&lt;TreeItem nodeId="1" label="RSMSSB" icon={FolderIcon}&gt;
  </code></pre>
  
  <p>Whole code:</p>
  
  <pre><code>import React from "react";
  import { makeStyles } from "@material-ui/core/styles";
  import TreeView from "@material-ui/lab/TreeView";
  import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
  import ChevronRightIcon from "@material-ui/icons/ChevronRight";
  import TreeItem from "@material-ui/lab/TreeItem";
  import FolderIcon from '@material-ui/icons/Folder';
  const useStyles = makeStyles({
    root: {
      height: 216,
      flexGrow: 1,
      maxWidth: 400
    }
  });
  
  export default function ControlledTreeView() {
    const classes = useStyles();
    const [expanded, setExpanded] = React.useState([]);
  
    const handleChange = (event, nodes) =&gt; {
      setExpanded(nodes);
    };
  
    return (
      &lt;TreeView
        className={classes.root}
        defaultCollapseIcon={&lt;ExpandMoreIcon /&gt;}
        defaultExpandIcon={&lt;ChevronRightIcon /&gt;}
        expanded={expanded}
        onNodeToggle={handleChange}
      &gt;
        &lt;TreeItem nodeId="1" label="RSMSSB" icon={FolderIcon}&gt;
          &lt;TreeItem nodeId="2" label="Science"&gt;&lt;/TreeItem&gt;
          &lt;TreeItem nodeId="3" label="Mathematics"&gt;
            &lt;TreeItem nodeId="4" label="Polynomials"&gt;&lt;/TreeItem&gt;
            &lt;TreeItem nodeId="7" label="Inequalities"&gt;&lt;/TreeItem&gt;
          &lt;/TreeItem&gt;
          &lt;TreeItem nodeId="8" label="English"&gt;&lt;/TreeItem&gt;
        &lt;/TreeItem&gt;
      &lt;/TreeView&gt;
    );
  }
  </code></pre>
  
  <p>Mock of design:</p>
  
  <p><a href="https://i.stack.imgur.com/iHjlz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iHjlz.png" alt="enter image description here"></a></p>
  
  <p>Thanks.</p>
  
  <p>EDIT:<br>
  working example: <a href="https://codesandbox.io/s/purple-night-mgzwh" rel="noreferrer">https://codesandbox.io/s/purple-night-mgzwh</a></p>