x64Bits / solid-icons

The simplest way to use icons in SolidJS
https://solid-icons.vercel.app
MIT License
284 stars 18 forks source link

The icon is a black square (bug?) #16

Closed ghost closed 1 year ago

ghost commented 1 year ago

image

App.tsx

import { Component } from "solid-js"
import * as TbIcon from 'solid-icons/tb'

export const App: Component = () => {
  return (
    <div>
      <TbIcon.TbRectangle size={50} />
    </div>
  )
}

tailwindcss config

module.exports = {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx,css,md,mdx,html,json,scss}",
  ],
  darkMode: "class",
  theme: {
    extend: {},
  },
  plugins: [require("daisyui")],
};

dependencies

"devDependencies": {
    "autoprefixer": "^10.4.13",
    "daisyui": "^2.36.1",
    "postcss": "^8.4.18",
    "tailwindcss": "^3.2.1",
    "typescript": "^4.8.2",
    "vite": "^3.0.9",
    "vite-plugin-solid": "^2.3.0"
  },
"dependencies": {
    "solid-icons": "^1.0.3",
    "solid-js": "^1.5.1"
  }

Stack: create-tw (SolidJS, Typescript, Daisyui)

ghost commented 1 year ago

Live Example: https://stackblitz.com/edit/daisyui-solidjs-dwaur1?file=src/App.jsx

ghost commented 1 year ago

Solved by reducing solidjs version from 1.5.1 back to 1.5.0

ghost commented 1 year ago

Possible bug. Works fine at solidjs v1.5.0

x64Bits commented 1 year ago

In the live example I couldn't reproduce the error with the versions you mentioned nor with the most recent ones of solid-js, you can check if updating solid-icons -> 1.0.4 helps to solve this? there were changes in solid-js recently and that changes broke the lib.

ghost commented 1 year ago

Yes, everything works fine now

Thank you, man!