qpp-style 9.43.3 → 9.44.0
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/components/Header/HeaderUI.jsx +2 -0
- package/components/Header/PreviewBanner.jsx +24 -0
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/lib/SvgComponents.jsx +11 -11
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import HeaderContainer from "./HeaderContainer";
|
|
|
6
6
|
import HeaderMenuItem from "./HeaderMenuItem";
|
|
7
7
|
import HeaderMobileButton from "./HeaderMobileButton";
|
|
8
8
|
import ImpersonatorBanner from "./ImpersonatorBanner";
|
|
9
|
+
import PreviewBanner from "./PreviewBanner.jsx";
|
|
9
10
|
import HeaderSearchBar from "../HeaderSearchBar";
|
|
10
11
|
import HelpIcon from "./HelpIcon";
|
|
11
12
|
import { HeaderStateProvider, useWindowWidth } from "./hooks";
|
|
@@ -130,6 +131,7 @@ const HeaderUI = ({
|
|
|
130
131
|
</nav>
|
|
131
132
|
</HeaderContainer>
|
|
132
133
|
<ImpersonatorBanner />
|
|
134
|
+
<PreviewBanner />
|
|
133
135
|
</>
|
|
134
136
|
);
|
|
135
137
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import cookie from "cookie";
|
|
3
|
+
import { TextButton } from "../Button";
|
|
4
|
+
import { CloseIcon } from "../../lib/SvgComponents";
|
|
5
|
+
|
|
6
|
+
function PreviewBanner() {
|
|
7
|
+
const { qpp_is_preview_mode: isPreviewMode = null } = cookie.parse(
|
|
8
|
+
document.cookie,
|
|
9
|
+
);
|
|
10
|
+
if (isPreviewMode === "true") {
|
|
11
|
+
return (
|
|
12
|
+
<div className="qpp-u-display--flex qpp-u-justify-content--between qpp-u-fill--gold-20 qpp-u-padding-x--40 qpp-u-padding-y--24 qpp-u-font-size--14 qpp-u-color--gray-80">
|
|
13
|
+
<div>YOU ARE IN PREVIEW MODE</div>
|
|
14
|
+
<TextButton href="/preview-mode" className="qpp-u-color--gray-80">
|
|
15
|
+
Exit Preview Mode
|
|
16
|
+
<CloseIcon />
|
|
17
|
+
</TextButton>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default PreviewBanner;
|