w3ui
w3ui copied to clipboard
CID component
Any app that makes use of IPFS is likely to render CIDs.
I was thinking it would be nice to create a CID component that has the following features:
- Can render a short version of the CID, e.g.
bafy...hmfm
- Copy to clipboard
- Link to gateway(s)
Have youse considered anything like this?
This is a great idea. I started something similar in my repo: https://github.com/codyzu/ipfs-drive/blob/main/src/cid.jsx
I would be happy to contribute a PR. The stickler here is that my component uses CSS to dynamically show the short version (with ellipses).
I'm wondering if this is a reasonable component for w3ui since IMO it would be heavily dependent on the styling used (I'm also imagining the copy to clipboard visual feedback, i.e. "copied").
My component uses unocss (roughly equivalent to windi or tailwind). I wondering if there would really be much value in a "generic" component that does this without styling. 🤔