@aarhus-university/au-lib-react-components 10.20.5 → 10.20.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "@aarhus-university/au-lib-react-components",
4
- "version": "10.20.5",
4
+ "version": "10.20.6",
5
5
  "description": "Library for shared React components for various applications on au.dk",
6
6
  "scripts": {
7
7
  "test": "jest",
@@ -58,6 +58,7 @@ const ThemeLanguageWrapper = ({
58
58
  importPromises,
59
59
  translationContext,
60
60
  lang,
61
+ withPageContentBlock,
61
62
  }) => {
62
63
  const translations = useTranslation<typeof defaultLabels>(defaultLabels, importPromises, lang);
63
64
  useEffect(() => {
@@ -68,14 +69,29 @@ const ThemeLanguageWrapper = ({
68
69
  body.classList.add(`theme--${theme}`);
69
70
  }
70
71
  });
72
+
73
+ if (withPageContentBlock) {
74
+ return (
75
+ <StrictMode>
76
+ <translationContext.Provider value={translations}>
77
+ <div className="page">
78
+ <main className={`theme--${theme} page__content`}>
79
+ <div className="page__content__block">
80
+ {children}
81
+ </div>
82
+ </main>
83
+ </div>
84
+ </translationContext.Provider>
85
+ </StrictMode>
86
+ );
87
+ }
88
+
71
89
  return (
72
90
  <StrictMode>
73
91
  <translationContext.Provider value={translations}>
74
92
  <div className="page">
75
93
  <main className={`theme--${theme} page__content`}>
76
- <div className="page__content__block">
77
- {children}
78
- </div>
94
+ {children}
79
95
  </main>
80
96
  </div>
81
97
  </translationContext.Provider>
@@ -83,6 +99,9 @@ const ThemeLanguageWrapper = ({
83
99
  );
84
100
  }
85
101
 
102
+ ThemeLanguageWrapper.defaultProps = {
103
+ withPageContentBlock: true,
104
+ };
86
105
 
87
106
  export {
88
107
  globalTheme,