@financial-times/dotcom-ui-header 7.1.0 → 7.1.3

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/README.md CHANGED
@@ -35,7 +35,7 @@ import { Header, Drawer } from '@financial-times/dotcom-ui-header'
35
35
 
36
36
  const SiteHeader = (props) => (
37
37
  <Header data={props.navigationData} userIsLoggedIn={props.userIsLoggedIn} />
38
- <Drawer data={props.navigationData} userIsLoggedIn={props.userIsLoggedIn} />
38
+ <Drawer data={props.navigationData} userIsLoggedIn={props.userIsLoggedIn} userIsSubscribed={props.userIsSubscribed} />
39
39
  )
40
40
  ```
41
41
 
@@ -71,6 +71,7 @@ All header components with the exception of `<LogoOnly />` require the following
71
71
  | variant | 'simple' \| 'large-logo' \| string | true | 'simple' | Adds a class name to the header element
72
72
  | userIsAnonymous | boolean | true | true | Marks a user as anonymous - can be set by middleware included with n-express |
73
73
  | userIsLoggedIn | boolean | true | false | Marks a user as logged in - can be set by middleware included with n-express |
74
+ | userIsSubscribed | boolean | true | false | Marks a user as subscribed - set by middleware(ammit task in preflight) included with n-express |
74
75
  | showUserNavigation | boolean | true | true | Show user navigation options such as `Sign out` or `Subscribe` |
75
76
  | showSubNavigation | boolean | true | true | Show the sub-navigation component which may include the crumbtrail |
76
77
  | showStickyHeader | boolean | true | true | Enable rendering of the sticky header component |
@@ -49,7 +49,7 @@ exports.TopColumnCenterSticky = TopColumnCenterSticky;
49
49
  const NavListRightLoggedInSticky = (props) => {
50
50
  var _a;
51
51
  const subscribeAction = (_a = props.data['navbar-right-anon'].items) === null || _a === void 0 ? void 0 : _a[1];
52
- return (react_1.default.createElement("div", { className: "o-header__top-column o-header__top-column--right" },
52
+ return (react_1.default.createElement(react_1.default.Fragment, null,
53
53
  !props.userIsSubscribed && subscribeAction && (react_1.default.createElement(partials_1.SubscribeButton, { item: subscribeAction, variant: props.variant, className: "o-header__top-button--hide-m" })),
54
54
  react_1.default.createElement(MyFtSticky, { className: "" })));
55
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/dotcom-ui-header",
3
- "version": "7.1.0",
3
+ "version": "7.1.3",
4
4
  "description": "",
5
5
  "browser": "browser.js",
6
6
  "main": "component.js",
@@ -23,7 +23,7 @@
23
23
  "author": "",
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@financial-times/dotcom-types-navigation": "^7.1.0",
26
+ "@financial-times/dotcom-types-navigation": "^7.1.3",
27
27
  "n-topic-search": "^4.0.0",
28
28
  "n-ui-foundations": "^9.0.0"
29
29
  },
@@ -127,7 +127,7 @@ const TopColumnCenterSticky = (props: THeaderProps) => {
127
127
  const NavListRightLoggedInSticky = (props: THeaderProps) => {
128
128
  const subscribeAction = props.data['navbar-right-anon'].items?.[1]
129
129
  return (
130
- <div className="o-header__top-column o-header__top-column--right">
130
+ <React.Fragment>
131
131
  {!props.userIsSubscribed && subscribeAction && (
132
132
  <SubscribeButton
133
133
  item={subscribeAction}
@@ -136,7 +136,7 @@ const NavListRightLoggedInSticky = (props: THeaderProps) => {
136
136
  />
137
137
  )}
138
138
  <MyFtSticky className="" />
139
- </div>
139
+ </React.Fragment>
140
140
  )
141
141
  }
142
142