v4.0.0
Breaking Changes
-
Next.js dependent components (CodeExample, Frame, NavList, PageLink, RouteMatch, and Router) are now bundled separately and must be imported via the path
@primer/blueprints/next-components -
NavLinknow works with or without Next.js. It now takes anextprop and will render aPageLinkorLinkaccordingly. It also takes acurrentPathprop to determine whether or not the link is currently being visited.. -
NavListnow requires acurrentPathprop to determine whether or not links are currently being visited. -
PackageStatushas been removed as it is too unique to Primer CSS docs and not very resuable. -
RouteMatchno longer auto-appends paths for child links. Be sure to provide the full path to children nested in aRouteMatch. -
Sectionhas been removed. It's styling functionality has been moved toSectionLink.Sectionhas auto-appended paths for child links. Be sure to provide the full path to anything you would have nested inSectionpreviously. -
SectionLinknow takes acurrentPathprop to bold text for links that are currently being visited. It also takesnextprop to either render aPageLinkor a Primer ComponentsLink. -
SideNavno longer nests it's items in a router. This is so that users can provide their own router of choice without being locked into the Next.js router. -
StatusLabelstatusprops have been renamed to'stable', 'newRelease', 'experimental', 'inReview', 'deprecated'(now uses camel case).
Enhancements
- Added the
nextprop to theHeadercomponent. The component now works with or without Next.js - Added the
nextprop to theSearchcomponent. The component now works with or without Next.js
Documentation
- Added documentation for
MarkdownHeading,StatusLabel,JumpNav,NavDropdown,NavItem,ResponsiveJumpNav,Search,SectionLink,NavList,RouteMatch,Routerand improved documentation for the rest of the components by adding props tables ✨