molefrog / wouter

🥢 A minimalist-friendly ~2.1KB routing for React and Preact
https://npm.im/wouter
The Unlicense
6.41k stars 146 forks source link

Feat: active (nav) links #419

Closed molefrog closed 4 months ago

molefrog commented 4 months ago

Allow Link to accept className function to conditionally render classes based on active/non-active state.

codesandbox[bot] commented 4 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

stackblitz[bot] commented 4 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

github-actions[bot] commented 4 months ago

size-limit report 📦

Path Size
packages/wouter/esm/index.js 2.11 KB (+1.17% 🔺)
packages/wouter/esm/use-browser-location.js 658 B (0%)
packages/wouter/esm/memory-location.js 834 B (0%)
packages/wouter/esm/use-hash-location.js 737 B (0%)
packages/wouter-preact/esm/index.js 2 KB (+1.34% 🔺)
packages/wouter-preact/esm/use-browser-location.js 552 B (0%)
packages/wouter-preact/esm/use-hash-location.js 607 B (0%)
packages/wouter-preact/esm/memory-location.js 702 B (0%)
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (c5efa2e) to head (62a7c7b). Report is 5 commits behind head on v3.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v3 #419 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 1 1 ========================================= Hits 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.