pedrodesu / yew-feather Goto Github PK
View Code? Open in Web Editor NEWYew components for Feather icons
Home Page: https://crates.io/crates/yew-feather
Yew components for Feather icons
Home Page: https://crates.io/crates/yew-feather
error[E0277]: the trait bound `ExternalLink: yew::Component` is not satisfied
--> src\components.rs:26:92
|
26 | <a href={&props.href} target="_blank" rel={"noreferrer noopener"}>{link_text} <ExternalLink /> </a>
| ^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `ExternalLink`
|
= help: the trait `yew::Component` is implemented for `ContextProvider<T>`
= note: required for `ExternalLink` to implement `yew::BaseComponent`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
I've forked yew-feather a few months ago under the assumption that you were not inactive. Thanks for coming back. Wondering, would you appreciate a PR? Let me summarize the changes I did:
build.rs
script. This allows to cargo to compile the crate out of the box without preprocessing such as running npm run-script build
. Makes easier to replace the dependency with a git dependency when overriding should yew continue to add breaking changes.slug.rs
file. This apparently speeds up compile time on my end compares to the js version.package.lock
file to fix the version of feather-icons
to depend on. No surprises and subtle differences in icon definitions.impl Property
etc has heavy costs which are sidestepping by reusing the properties struct. This alone cut compile times down from 10s to under 4s on my end. The rest seems to be the few hundred of icons definitions. It might be worth to add some (granular) features to enable/disable some icons to make this even faster. Keep in mind the timing is a crude wall-time measurement of this crate only I got from -Z timings
and includes the download of feather-icons
.Let me know what you think, looking forward ๐
A way to add onclick to icon would be really nice.
<XCircle size=20 onclick={remove_item}>
Is it possible to publish a new version of this crate ?
Thanks,
Marc-Antoine
Currently all props on icons are marked as &'static str
, which means that it must be specified as a string literal.
Would it be possible to change the type of properties to AttrValue
so that dynamic variables can be used?
https://docs.rs/yew/0.19.3/yew/virtual_dom/enum.AttrValue.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.