@financial-times/qanda-ui 0.0.1-beta.22 → 0.0.1-beta.23

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.
@@ -31,7 +31,7 @@ function ExpertDrawer() {
31
31
  }
32
32
  return ((0, jsx_runtime_1.jsx)(Overlay_1.default, { title: qanda_1.PRODUCT_NAME, closeCallback: () => dispatch((0, expertSlice_1.closeExpertForm)()), options: {
33
33
  shadow: true,
34
- noBackground: true,
34
+ allowInteraction: true,
35
35
  }, children: (0, jsx_runtime_1.jsx)("div", { className: "o-comments", id: "o-comments-stream", "data-o-component": "o-comments", "data-o-comments-article-id": storyId, "data-o-comments-article-url": `https://www.ft.com/content/${storyId}`, "data-o-comments-use-staging-environment": useStaging, "data-o-comments-title": title }) }));
36
36
  }
37
37
  exports.default = ExpertDrawer;
@@ -7,10 +7,7 @@ const jsx_runtime_1 = require("preact/jsx-runtime");
7
7
  const o3_button_1 = require("@financial-times/o3-button");
8
8
  const classnames_1 = __importDefault(require("classnames"));
9
9
  function Overlay({ title, children, closeCallback, options = {}, }) {
10
- return ((0, jsx_runtime_1.jsxs)("div", { className: "overlay", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)([
11
- 'overlay__outer',
12
- { 'overlay__outer--no-background': options.noBackground },
13
- ]) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)([
10
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "overlay", children: [!options.allowInteraction && (0, jsx_runtime_1.jsx)("div", { className: "overlay__outer" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)([
14
11
  'overlay__inner',
15
12
  { 'overlay__inner--shadow': options.shadow },
16
13
  ]), children: [(0, jsx_runtime_1.jsx)("div", { className: "overlay__header", children: (0, jsx_runtime_1.jsxs)("div", { className: "overlay__header-bar", children: [(0, jsx_runtime_1.jsx)("span", { className: "o3-type-body-highlight overlay__header-title", children: title }), (0, jsx_runtime_1.jsx)(o3_button_1.Button, { attributes: { className: 'overlay__header-close' }, iconOnly: true, icon: "cross", label: "Close", type: "ghost", theme: "mono", onClick: () => closeCallback() })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "overlay__content", children: children })] })] }));
@@ -26,7 +26,7 @@ function ExpertDrawer() {
26
26
  }
27
27
  return (_jsx(Overlay, { title: PRODUCT_NAME, closeCallback: () => dispatch(closeExpertForm()), options: {
28
28
  shadow: true,
29
- noBackground: true,
29
+ allowInteraction: true,
30
30
  }, children: _jsx("div", { className: "o-comments", id: "o-comments-stream", "data-o-component": "o-comments", "data-o-comments-article-id": storyId, "data-o-comments-article-url": `https://www.ft.com/content/${storyId}`, "data-o-comments-use-staging-environment": useStaging, "data-o-comments-title": title }) }));
31
31
  }
32
32
  export default ExpertDrawer;
@@ -2,10 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
2
2
  import { Button } from '@financial-times/o3-button';
3
3
  import classNames from 'classnames';
4
4
  function Overlay({ title, children, closeCallback, options = {}, }) {
5
- return (_jsxs("div", { className: "overlay", children: [_jsx("div", { className: classNames([
6
- 'overlay__outer',
7
- { 'overlay__outer--no-background': options.noBackground },
8
- ]) }), _jsxs("div", { className: classNames([
5
+ return (_jsxs("div", { className: "overlay", children: [!options.allowInteraction && _jsx("div", { className: "overlay__outer" }), _jsxs("div", { className: classNames([
9
6
  'overlay__inner',
10
7
  { 'overlay__inner--shadow': options.shadow },
11
8
  ]), children: [_jsx("div", { className: "overlay__header", children: _jsxs("div", { className: "overlay__header-bar", children: [_jsx("span", { className: "o3-type-body-highlight overlay__header-title", children: title }), _jsx(Button, { attributes: { className: 'overlay__header-close' }, iconOnly: true, icon: "cross", label: "Close", type: "ghost", theme: "mono", onClick: () => closeCallback() })] }) }), _jsx("div", { className: "overlay__content", children: children })] })] }));
package/dist/qanda.scss CHANGED
@@ -386,10 +386,6 @@ $app-header-color: #007acc;
386
386
  background: var(--o3-color-palette-black-90);
387
387
  }
388
388
 
389
- .overlay__outer--no-background {
390
- background: none;
391
- }
392
-
393
389
  .overlay__inner {
394
390
  border-radius: var(--o3-spacing-2xs) var(--o3-spacing-2xs) 0 0;
395
391
  background: var(--o3-color-use-case-page-background);
@@ -1,5 +1,5 @@
1
1
  type OverlayOptions = {
2
- noBackground?: boolean;
2
+ allowInteraction?: boolean;
3
3
  shadow?: boolean;
4
4
  };
5
5
  type OverlayProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/qanda-ui",
3
- "version": "0.0.1-beta.22",
3
+ "version": "0.0.1-beta.23",
4
4
  "description": "Components for the Live Q&A (AKA Ask an Expert) UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",