import {MaterialIcons} from '../typings'; import Component from './Component'; type Attributes = { icon?: MaterialIcons }; declare global { namespace JSX { interface IntrinsicElements { Mdi: Mdi } } } export default class Mdi extends Component { view() { this.attrs.addClassNames('mdi', `mdi-${this.attrs.pull('icon') as string}`); return ; } } /** Quando MWC supporterà pienamente le icone SVG si potrà fare così: import * as mdi from '@mdi/js'; import {camelCase} from 'lodash/string'; return ; @see https://github.com/material-components/material-web/issues/1812 */