Richardson
Richardson

Reputation: 2294

any idea how to import mui icon as react component?

I want to import mui-icon as a component so I can control the name of that icon, since for implantation reasons I want a name that is different that the default name of the icon.

// Default import 
import ViewQuiltIcon from '@material-ui/icons/ViewQuilt';
// Target imput (not working)
import ViewQuiltIcon as somename  from '@material-ui/icons/ViewQuilt';

Upvotes: 0

Views: 155

Answers (1)

Sudip Thapa
Sudip Thapa

Reputation: 203

import AnyName from '@material-ui/icons/ViewQuilt';

Have you tried like AnyName?

Upvotes: 1

Related Questions