Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create class to add icons #245

Open
nyel-gh opened this issue Nov 13, 2017 · 5 comments
Open

Create class to add icons #245

nyel-gh opened this issue Nov 13, 2017 · 5 comments
Labels

Comments

@nyel-gh
Copy link

nyel-gh commented Nov 13, 2017

what do you guys think of this? had a very rough time adding some fa-icons

@amorey
Copy link
Member

amorey commented Nov 13, 2017

Have you tried using the "Landing Page with Extras" example as a starting point?
https://www.muicss.com/docs/v1/example-layouts/landing-page-with-extras

h/t @mrmccormack

@nyel-gh
Copy link
Author

nyel-gh commented Nov 19, 2017

I'm sorry if I was not clear. What I mean is adding fa-icon beside a textfield.

@amorey
Copy link
Member

amorey commented Nov 19, 2017

Adding font-icon helpers to the core library is outside the scope of the project but we can certainly provide tutorials or other guides. Do you have a screenshot of what you're trying to do?

@nyel-gh
Copy link
Author

nyel-gh commented Nov 19, 2017

I actually did it already. However it did cost me a lot of time. I was thinking then that adding the icons is as easy as doing in MaterializeCSS. Just my inputs though, thanks for replying, man! Good luck on your project!

@amorey
Copy link
Member

amorey commented Nov 20, 2017

What problems did you run into? MUI is agnostic about font icon libraries so you can use any icon library you want. Here's an example that uses Google's Material Design icons (same as MaterializeCSS):

<html>
  <head>
    <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="//cdn.muicss.com/mui-0.9.30/css/mui.min.css" rel="stylesheet">
    <script src="//cdn.muicss.com/mui-0.9.30/js/mui.min.js"></script>
  </head>
  <body>
    <div class="mui-container">
      <div class="mui-panel">
        <h1>My Title</h1>
        <div>
          <i class="material-icons">face</i>
        </div>
        <button class="mui-btn mui-btn--primary mui-btn--raised">My Button</button>
      </div>
    </div>
  </body>
</html>

https://jsfiddle.net/muicss/pvtx48w4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants