File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ SciReactUI Changelog
22====================
33
44
5- [ v0.1.1 ] - 2025-?-?
5+ [ v0.2.0 ] - 2025-?-?
66--------------------
77
88### Added
@@ -12,7 +12,7 @@ SciReactUI Changelog
1212- Styles added to Navbar and Footer incorrectly remove built in styles.
1313
1414### Changed
15- - Breadcrumbs component uses react-router-dom for page routing.
15+ - Breadcrumbs component uses react-router-dom for page routing. Breaking change requires use of BrowserRouter or SciReactUIProvider.
1616
1717[ v0.1.0] - 2025-04-10
1818---------------------
Original file line number Diff line number Diff line change 11{
22 "name" : " @diamondlightsource/sci-react-ui" ,
3- "version" : " 0.1.1alpha " ,
3+ "version" : " 0.2 " ,
44 "description" : " A theme and component library to make websites at scientific institutions simple to create." ,
55 "author" : " Diamond Light Source" ,
66 "license" : " ISC" ,
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ export * from "./themes/BaseTheme";
1212export * from "./themes/GenericTheme" ;
1313export * from "./themes/DiamondTheme" ;
1414export * from "./themes/ThemeProvider" ;
15+ export * from "./themes/SciReactUIProvider" ;
Original file line number Diff line number Diff line change 11import * as React from "react" ;
2- import { BrowserRouter } from "react-router-dom" ;
2+ import { BrowserRouter , BrowserRouterProps } from "react-router-dom" ;
33import { ThemeProvider , ThemeProviderProps } from "./ThemeProvider" ;
44
5- type SciReactUIProviderProps = React . PropsWithChildren < ThemeProviderProps > ;
5+ interface SciReactUIProviderProps
6+ extends React . PropsWithChildren < ThemeProviderProps > {
7+ router ?: BrowserRouterProps ;
8+ }
69
7- export const SciReactUIProvider : React . FC < SciReactUIProviderProps > = (
8- props ,
9- ) => {
10+ export const SciReactUIProvider : React . FC < SciReactUIProviderProps > = ( {
11+ children,
12+ router,
13+ ...themeProps
14+ } ) => {
1015 return (
11- < ThemeProvider { ...props } >
12- < BrowserRouter > { props . children } </ BrowserRouter >
16+ < ThemeProvider { ...themeProps } >
17+ < BrowserRouter { ... router } > { children } </ BrowserRouter >
1318 </ ThemeProvider >
1419 ) ;
1520} ;
You can’t perform that action at this time.
0 commit comments