Giter Site home page Giter Site logo

Comments (3)

mikamaunula avatar mikamaunula commented on July 23, 2024

It would nice if MUI dependency could be removed. Maybe If you could make pull request of that update. It would be then merged.

It is also ok to refer to this repo if you want to do your own repo.

Thanks for interest.

from react-material-icons.

Cottin avatar Cottin commented on July 23, 2024

After doing some more research around react + svg I found https://github.com/jhamlet/svg-react-loader which solves my problem in a different way. It let's you use SVGs inline but is a bit more flexible in that you can download any .svg file to use. But it's kind of a different use-case than your repo and both have value!

I apologise but I think I'm too lazy to do a pull request but I'm guessing introducing an element prop and doing something like this should be enough to remove the MUI dependency:

var React = require('react');

var createClass = require('create-react-class');
                                   <------------ Removed MUI

var ActionAlarm = createClass({
  displayName: 'ActionAlarm',

  getDefaultProps: function() {
    return {element: React.DOM.svg}          <------------ normal svg as default
  },

  render: function render() {
    return React.createElement(
      this.props.element,          <------ using element here
      this.props,
      React.createElement('path', { d: 'M... 7z' })
    );
  }

});

module.exports = ActionAlarm;

Like so, it's up to the consumer to supply a mui.svg as the element prop if he/she wants to.

from react-material-icons.

suhasv95 avatar suhasv95 commented on July 23, 2024

@Cottin You can take a look at https://github.com/suhasv1995/material-react-icons. With absolutely zero dependencies.

from react-material-icons.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.