I try to use MaterialUi's <MenuIcon />
(like here https://material-ui.com/demos/app-bar/) in my Hyperstack-App but I get error below.
I installed @material-ui/icons
with yarn, then I imported it in /app/javascript/packs/application.js
like so
import * as Mic from '@material-ui/icons';
global.Mic = Mic;
then ran bin/webpack without errors.
Then I have something like this in a component:
Mui.Toolbar() do
if @menu == 'true'
Mui.IconButton() do
Mic.MenuIcon() {}
end
...
But I get an error:
Uncaught error: RuntimeError: could not import a react component named: Mic.MenuIcon
What am I doing wrong?
Thanks a lot for your help :)