Giter Club home page Giter Club logo

Comments (4)

ajmnz avatar ajmnz commented on July 16, 2024 1

Yes, multiple previews seem to be supported:

Screenshot 2024-06-11 at 22 32 05

I guess we should also add them with a background in order to support both light and dark themes. Black on white would work, although kind of ugly. Whatever you prefer.

As per the size, probably a few MB. At most 1kb per icon, times 6 previews, times the total number of icons. The following snippet is 934 bytes

/**
 * @preview ![img](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iI2ZmZmZmZiIgdmlld0JveD0iMCAwIDI1NiAyNTYiPjxwYXRoIGQ9Ik0xMjgsMjRoMEExMDQsMTA0LDAsMSwwLDIzMiwxMjgsMTA0LjEyLDEwNC4xMiwwLDAsMCwxMjgsMjRabTg3LjYyLDk2SDE3NS43OUMxNzQsODMuNDksMTU5Ljk0LDU3LjY3LDE0OC40MSw0Mi40QTg4LjE5LDg4LjE5LDAsMCwxLDIxNS42MywxMjBaTTk2LjIzLDEzNmg2My41NGMtMi4zMSw0MS42MS0yMi4yMyw2Ny4xMS0zMS43Nyw3N0MxMTguNDUsMjAzLjEsOTguNTQsMTc3LjYsOTYuMjMsMTM2Wm0wLTE2Qzk4LjU0LDc4LjM5LDExOC40Niw1Mi44OSwxMjgsNDNjOS41NSw5LjkzLDI5LjQ2LDM1LjQzLDMxLjc3LDc3Wm0xMS4zNi03Ny42Qzk2LjA2LDU3LjY3LDgyLDgzLjQ5LDgwLjIxLDEyMEg0MC4zN0E4OC4xOSw4OC4xOSwwLDAsMSwxMDcuNTksNDIuNFpNNDAuMzcsMTM2SDgwLjIxYzEuODIsMzYuNTEsMTUuODUsNjIuMzMsMjcuMzgsNzcuNkE4OC4xOSw4OC4xOSwwLDAsMSw0MC4zNywxMzZabTEwOCw3Ny42YzExLjUzLTE1LjI3LDI1LjU2LTQxLjA5LDI3LjM4LTc3LjZoMzkuODRBODguMTksODguMTksMCwwLDEsMTQ4LjQxLDIxMy42WiI+PC9wYXRoPjwvc3ZnPg==)
 */

from react.

ajmnz avatar ajmnz commented on July 16, 2024 1

^ I'll detail the total size increase in the PR.

from react.

rektdeckard avatar rektdeckard commented on July 16, 2024

I love this idea. Probably no big deal because comments are stripped during bundling, but what is the impact on the overall size of the source code?

If you're up for making the change, be sure to do it in the assembly script rather than doing a one-time codemod in the typedefs:

https://github.com/phosphor-icons/react/blob/master/scripts/assemble.ts#L101

from react.

rektdeckard avatar rektdeckard commented on July 16, 2024

Question though, can more than one preview be included? Will probably want to show all 6 weights, as they are all grouped together at the component level.

from react.

Related Issues (20)

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.