Giter Club home page Giter Club logo

solar-icon-set-react's Introduction

Solar Icon Set

Solar Icon Set - free giant pack of icons. Drawn from scratch. Six styles, perfect balance, we`ve got everything You could ever need in React.

Solar Icon Set

Install

npm install solar-icon-set

Usage

import * as SolarIconSet from "solar-icon-set";

function App() {
  return <SolarIconSet.Document color="#1C274C" size={24} iconStyle="Bold" />;
}

or

import { Document } from "solar-icon-set/school";

function App() {
  return <Document color="#1C274C" size={24} iconStyle="Bold" />;
}

Prop Types

Property Type Required Default Description
color String No #1C274D Override the icon's fill color
size Number No 16px Change icon size
autoSize Boolean No false Enable automatic resizing
svgProps SVGSVGElement No undefined SVG default properties
iconStyle Broken, LineDuotone, Linear, Outline, Bold, BoldDuotone No Linear Choose one of the styles

solar-icon-set-react's People

Contributors

chebarash avatar

Stargazers

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

solar-icon-set-react's Issues

svg Height and Width "inherit" values are invalid

Hello,
I'm trying to use this library, but it generates 2 warnings for each icon in the browser console:

Valeur inherit inattendue lors de l’analyse de l’attribut width.
Valeur inherit inattendue lors de l’analyse de l’attribut height.

This can be translated to "Unexpected value for width/height attribute"

In fact, each svg contains "inherit" for width and height, but they are not valid values in svg.
<svg width="inherit" height="inherit" viewBox="0 0 24 24"
https://github.com/480-Design/Solar-Icon-Set-React/blob/main/src/icons/Arrows/AltArrowDown.tsx

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/width#svg
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/height#svg
Valid values for svg width and height are: auto | a length | a percentage

If we remove width="inherit" height="inherit" from svg, icon seems to still work and are still resizing when parent wrapper width and height are updated.

<span
      role="img"
      aria-hidden="true"
      style={{
        color: color,
        width: size,
        height: size,
        display: "inline-flex",
        fontSize: "inherit",
      }}
      {...restProps}
    >
      {icon}
    </span>

https://github.com/480-Design/Solar-Icon-Set-React/blob/main/src/icons/IconWrapper.tsx

So can we remove these props?

And is this project still maintained? Links on the readme are dead too

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.