Comments (4)
Yes, multiple previews seem to be supported:
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.
^ I'll detail the total size increase in the PR.
from react.
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.
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)
- Could not find a declaration file when using SSR HOT 2
- SSR Components missing default size="1em"
- SSR component types are not resolving
- allow to add Contributing.md file.
- Importing icons from `@phosphor-icons/react/dist/ssr` renders the icons, but gives issues in the editor HOT 5
- TypeError: Cannot create property 'displayName' on number 'Infinity' HOT 7
- Unble to dynamic import icons .mjs extensions HOT 9
- Icon instance className overwrites context className HOT 8
- New Twitter (x.com) icon? HOT 1
- Cannot find package on node 20 HOT 6
- ./node_modules/@phosphor-icons/react/dist/lib/context.mjs Can't import the named export 'createContext' from non EcmaScript module (only default export is available) HOT 10
- UnhandledRejection Error: Cannot Find React Package HOT 23
- 'use client' in client icons and IconContext HOT 2
- React warning after update to 2.1.4 HOT 1
- Issue updating past 2.1.3 HOT 2
- Incorrect exports specified in `package.json` HOT 2
- Jest test fails if importing directly from `/dist` folder
- Custom icons: Typescript and ESLint errors in Next.js 14 HOT 1
- React web pack build error in phosphor icons HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.