yew_nav_link/
lib.rs

1//! # Yew Nav Link
2//!
3//! The `nav_link` module provides a NavLink component and related types for creating
4//! navigational links that are aware of their active state based on the current route in the application.
5//!
6//! # Example
7//!
8//! ```rust
9//! use yew-nav-link::{nav_link, NavLink};
10//! ```
11//!
12//! ```html
13//!     <!-- Creating a NavLink for the Home route with the text "Home Page" -->
14//!     <li class="nav-item">
15//!         { nav_link(HomeRoute::IntroPage, "Home") }
16//!     </li>
17//!     <!-- or -->
18//!     <li class="nav-item">
19//!         <NavLink<HomeRoute> to={HomeRoute::IntroPage}>
20//!             {"Home"}
21//!         </NavLink<HomeRoute>>
22//!     </li>
23//! ```
24
25mod nav_link;
26
27pub use nav_link::nav_link;
28pub use nav_link::NavLink;
29pub use nav_link::NavLinkProps;