-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Link
component back
#411
Conversation
Anchor
component + minor additionsAnchor
component
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #411 +/- ##
==========================================
+ Coverage 54.22% 54.28% +0.05%
==========================================
Files 154 154
Lines 13732 13717 -15
==========================================
Hits 7446 7446
+ Misses 6286 6271 -15 ☔ View full report in Codecov by Sentry. |
I actually had a |
We could add a |
New things:
|
# Conflicts: # crates/components/src/external_link.rs
New changes:
|
Amazing work @tigerros ! I just resolved all the conflicts and cleaned some code, this LGTM. I would deprecate |
I don't think |
I can try to make |
Did something change with hooks? I thought you had to call them every time so you can't remove |
Nothing changed, but I can get the navigator myself in L138 instead of using the hook: let router = try_consume_context::<RouterContext>()
.expect("Must be called in a descendant of a Router component");
router.push(to.clone()); |
Just found a smalllllllllll bug with the events system in Freya, will open a PR later, after that, I will push some final touches and this PR will be ready to go |
works! |
I'll add some unit tests before merging |
Nice work @tigerros ! |
Features
Add
Link
, which works like Dioxus router'sLink
. Example code:Optimize
ExternalLink
a bit.Notes
ExternalLink
obsolete, except for theming.Link
might be a better name.rect
to add shadows, change color, etc., but it's impossible to remove styles. As for the themes, I just didn't bother adding them, which is why this is a draft.