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