Giter Site home page Giter Site logo

materialdesign-js's Introduction

Hi, I am Austin

Probably working on icons or something related to icons. If you're ever in Chicago feel free to reach out for tea ๐Ÿต / beer ๐Ÿบ.

Co-run Pictogrammers with some amazing designers and developers.

Topics I Enjoy

  • โœ’ Icons (obviously)
  • ๐Ÿงฉ Web Components
  • ๐Ÿ“ƒ TypeScript
  • ๐Ÿ“„ Documentation
  • ๐Ÿค” Unit Testing!

Contact me on Mastodon @templarian. Unless it's about something I maintain, then maybe create an issue ๐Ÿ˜‰.

materialdesign-js's People

Contributors

mririgoyen avatar templarian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

materialdesign-js's Issues

ESM Exports?

Feature Request: ESM Exports.

I use Vite for front-end tooling and without ESM exports the whole library is sent to the browser.

Missing icon: view-column-outline

The webpage example says to use the following string to import the above mentioned icon.

import { mdiViewColumnOutline } from '@mdi/js';

However, it does not exist in the repository.

Missing icons

I'm getting errors that this one no longer exists as of 5.0.45
mdi-text-box-multiple-outline

Looking at the mdi.js file confirms that

mdi.js is not a valid node js file

mdi.js uses the ESM export style, but has a .js file extension instead of .mjs, which prevents node from understanding the file type. mdi.js should be mdi.mjs, and a new mdi.js file should be included that uses the CJS style. This appears to exist in the git repo, but isn't actually distributed for some reason.

Bug: Could not resolve "prop-types"

โฏ yarn dev
yarn run v1.22.17
$ pm2-dev ./pm2.config.js  --env development
===============================================================================
--- PM2 development mode ------------------------------------------------------
Apps started         : Remix,Tailwind CSS,Cloudflare Wrangler
Processes started    : 3
Watch and Restart    : Enabled
Ignored folder       : node_modules
===============================================================================
Remix-0  | Watching Remix app in development mode...
Remix-0  |  > node_modules/@mdi/react/Icon.js:1:965: error: Could not resolve "prop-types" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
Remix-0  |     1 โ”‚ ...ion(e,t){e.exports=require("prop-types")},function(e,t){e.exports=...
Remix-0  |       โ•ต                               ~~~~~~~~~~~~
Remix-0  | 
Remix-0  | Build failed with 1 error:
Remix-0  | node_modules/@mdi/react/Icon.js:1:965: error: Could not resolve "prop-types" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
Remix-0  | ๐Ÿ’ฟ Built in 181ms

even after i install prop-types manually, it still cannot work properly.

using latest version of:

  • @mdi/js
  • @mdi/react

Auto Import icons

I'm using a bunch of MDI icons in my project.

So firstly. I've imported all icons. Now I want to reduce size of the bundle by importing only used icons.
Is there any way to import them automatically ?

Feature Request: Export the SVG Element Itself

Problem

Using this library to import icons doesn't feel natural. I would expect when importing an icon that it could be used as imported. However, it's quite a burden to always have to create the parent SVG element and its children to be able to use the imported data.

import { ABTesting } from '@mdi/js';

return (
  <svg ...allSVGAttributes>
    <path ...pathAttributes d={ABTesting} />
  </svg>
)

While this isn't particularly an issue when bringing this library into a component library which exposes an Icon component, it makes using the library outside of that settings very burdensome.

Request

I would love to be able to import the icons and already have the SVG element with its viewBox and other properties already set to ensure ease of use.

import { ABTesting } from '@mdi/js';

return (
  {ABTesting}
)

Outside of creating a React/Framework Icon component, is there a way to achieve getting these icons with the svg and path attributes?

How to use it without node

I installed the module as:

npm install @mdi/js

And want to use it in my template that is running in a server built with GO lang, so i wrote the below:

<script type="module" src="./node_modules/@mdi/js/mdi.js"></script>

Bob lives in a <span class="mdi mdi-home"></span>.

But no icon shown up!

I even failed with

<script>
     import { mdi-home } from './node_modules/@mdi/js/mdi.js';
<script>

Missing icon: snowmobile

Hello! The icon exists on the website but is missing from the library.

This is the usage example from the website:
import { mdiSnowmobile } from '@mdi/js';

Icons missing in package

Hello, it seems icons are missing on package.
I can't find the mdiBriefcaseArrowLeftRight and others briefcase with arrow in the mdi.js file.

Can you fix it please ?

Thanks in advance.

Vincent.

Question dynamic import treeshaking

Hello I have the following code to dynamically import the icon. Only problem is, it doesn't treeshake. Is there a way to make dynamic import treeshaking?

image

missing pdf icon

i not found .mdi-file-pdf (with acrobat logo) on last release why? can u please reput this icon?

Applying spin and sizing

Previously I used Vuetify and inserted an icon like

<v-icon>loading mdi-spin mdi-36px</v-icon

Now I'm using this library and doing

import { mdiLoading } from '@mdi/js';

The icon itself is working just fine.

Is it possible to attach the spin and size modifications when using the icons in this way?

Thank you

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.