title: Typed props when using Material UI makeStyles
body: <p>I'm trying to migrate some of my React components to the new <code>makeStyles</code>/<code>useStyles</code> hook API from Material UI. If I understand correctly I can keep accepting <code>classes</code> as a prop from parent components as long as I pass the props to <code>useStyles</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>const MyComponent = (props: Props) =&gt; {
    const { myProp } = props;
    const classes = useStyles(props);
  </code></pre>
  
  <p>I was wondering how to declare my <code>Props</code> type in that case. The equivalent with the HOC API being:</p>
  
  <pre class="lang-js prettyprint-override"><code>const styles = createStyles({
    a: {},
    b: {}
  });
  
  interface Props extends WithStyles&lt;typeof styles&gt; {
    myProp: string;
  }
  </code></pre>
  
  <p>Here is something that works but looks a bit verbose:</p>
  
  <pre class="lang-js prettyprint-override"><code>const styles = createStyles({
    a: {},
    b: {}
  });
  
  interface Props extends StyledComponentProps&lt;ClassKeyOfStyles&lt;typeof styles&gt;&gt; {
    myProp: string;
  }
  
  const useStyles = makeStyles(styles);
  </code></pre>
  
  <p>Is there a better way? Ideally without the need for <code>createStyles</code> and using <code>makeStyles</code> inline with the styles declaration.</p>