@npm_leadtech/legal-lib-components 7.106.6 → 7.106.7

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PhoneNumberDisplay, TrustPilotWidget } from '../../atoms';
2
3
  import { DesktopMenuStyled } from './DesktopMenu.styled';
3
4
  import { HelpSection } from '../../molecules';
4
- import { PhoneNumberDisplay } from '../../atoms';
5
- export const DesktopMenu = ({ phoneNumber, phoneNumberBorder, menuList, userActions, homeUrl }) => {
6
- return (_jsxs(DesktopMenuStyled, { children: [phoneNumber && _jsx(PhoneNumberDisplay, { phoneNumber: phoneNumber, border: phoneNumberBorder }), menuList?.items?.length && _jsx(HelpSection, { ...menuList, homeUrl: homeUrl }), userActions] }));
5
+ export const DesktopMenu = ({ phoneNumber, phoneNumberBorder, menuList, userActions, homeUrl, showTrustpilot, trustpilotHref }) => {
6
+ return (_jsxs(DesktopMenuStyled, { children: [phoneNumber && _jsx(PhoneNumberDisplay, { phoneNumber: phoneNumber, border: phoneNumberBorder }), showTrustpilot && _jsx(TrustPilotWidget, { href: trustpilotHref }), menuList?.items?.length && _jsx(HelpSection, { ...menuList, homeUrl: homeUrl }), userActions] }));
7
7
  };
@@ -1,7 +1,7 @@
1
+ import { PhoneNumberDisplay, TrustPilotWidget } from '../../atoms'
1
2
  import { DesktopMenuProps } from './DesktopMenuProps'
2
3
  import { DesktopMenuStyled } from './DesktopMenu.styled'
3
4
  import { HelpSection } from '../../molecules'
4
- import { PhoneNumberDisplay } from '../../atoms'
5
5
  import React from 'react'
6
6
 
7
7
  export const DesktopMenu: React.FC<DesktopMenuProps> = ({
@@ -9,11 +9,14 @@ export const DesktopMenu: React.FC<DesktopMenuProps> = ({
9
9
  phoneNumberBorder,
10
10
  menuList,
11
11
  userActions,
12
- homeUrl
12
+ homeUrl,
13
+ showTrustpilot,
14
+ trustpilotHref
13
15
  }) => {
14
16
  return (
15
17
  <DesktopMenuStyled>
16
18
  {phoneNumber && <PhoneNumberDisplay phoneNumber={phoneNumber} border={phoneNumberBorder} />}
19
+ {showTrustpilot && <TrustPilotWidget href={trustpilotHref} />}
17
20
  {menuList?.items?.length && <HelpSection {...menuList} homeUrl={homeUrl} />}
18
21
  {userActions}
19
22
  </DesktopMenuStyled>
@@ -5,4 +5,6 @@ export interface DesktopMenuProps {
5
5
  menuList?: HelpSectionProps;
6
6
  userActions: React.ReactNode;
7
7
  homeUrl: string;
8
+ showTrustpilot?: boolean;
9
+ trustpilotHref?: string;
8
10
  }
@@ -6,4 +6,6 @@ export interface DesktopMenuProps {
6
6
  menuList?: HelpSectionProps
7
7
  userActions: React.ReactNode
8
8
  homeUrl: string
9
+ showTrustpilot?: boolean
10
+ trustpilotHref?: string
9
11
  }
@@ -3,6 +3,6 @@ import { AppHeaderStyled, AppHeaderWrapper } from './AppHeader.styled';
3
3
  import { DesktopMenu, MobileMenu } from '../../organisms';
4
4
  import { Logo } from '../../atoms';
5
5
  import './AppHeader.scss';
6
- export const AppHeader = ({ siteName = 'LawDistrict', homeUrl = '/', sitePhone, sitePhoneBorder, scheduleText, headerFullWidth, menuList, toggleMenuHelpOpen, toggleMenuPersonalOpen, isHelpActive, isPersonalActive, userActions, helpTriggerImage, userTriggerImage, handleClickLogo, headerClassnames, closeText = 'Close', showTopBar }) => {
7
- return (_jsx(AppHeaderStyled, { className: headerClassnames, children: _jsxs(AppHeaderWrapper, { itemScope: true, itemType: 'https://schema.org/Brand', className: `${headerFullWidth ? '--no-grid' : 'wrapper'}`, children: [_jsx("a", { className: 'header__logo', onClick: (event) => handleClickLogo(event, homeUrl), href: homeUrl, children: _jsx(Logo, { siteName: siteName, width: '188', height: '32' }) }), _jsx(DesktopMenu, { phoneNumber: sitePhone, phoneNumberBorder: sitePhoneBorder, menuList: menuList, userActions: userActions, homeUrl: homeUrl }), _jsx(MobileMenu, { closeText: closeText, helpTriggerImage: helpTriggerImage, isHelpActive: isHelpActive, isPersonalActive: isPersonalActive, toggleMenuHelpOpen: toggleMenuHelpOpen, toggleMenuPersonalOpen: toggleMenuPersonalOpen, userTriggerImage: userTriggerImage, homeUrl: homeUrl, menuList: menuList, scheduleText: scheduleText, sitePhone: sitePhone, userActions: userActions, showTopBar: showTopBar })] }) }));
6
+ export const AppHeader = ({ siteName = 'LawDistrict', homeUrl = '/', sitePhone, sitePhoneBorder, scheduleText, headerFullWidth, menuList, toggleMenuHelpOpen, toggleMenuPersonalOpen, isHelpActive, isPersonalActive, userActions, helpTriggerImage, userTriggerImage, handleClickLogo, headerClassnames, closeText = 'Close', showTopBar, showTrustpilot = false, trustpilotHref }) => {
7
+ return (_jsx(AppHeaderStyled, { className: headerClassnames, children: _jsxs(AppHeaderWrapper, { itemScope: true, itemType: 'https://schema.org/Brand', className: `${headerFullWidth ? '--no-grid' : 'wrapper'}`, children: [_jsx("a", { className: 'header__logo', onClick: (event) => handleClickLogo(event, homeUrl), href: homeUrl, children: _jsx(Logo, { siteName: siteName, width: '188', height: '32' }) }), _jsx(DesktopMenu, { phoneNumber: sitePhone, phoneNumberBorder: sitePhoneBorder, menuList: menuList, userActions: userActions, homeUrl: homeUrl, showTrustpilot: showTrustpilot, trustpilotHref: trustpilotHref }), _jsx(MobileMenu, { closeText: closeText, helpTriggerImage: helpTriggerImage, isHelpActive: isHelpActive, isPersonalActive: isPersonalActive, toggleMenuHelpOpen: toggleMenuHelpOpen, toggleMenuPersonalOpen: toggleMenuPersonalOpen, userTriggerImage: userTriggerImage, homeUrl: homeUrl, menuList: menuList, scheduleText: scheduleText, sitePhone: sitePhone, userActions: userActions, showTopBar: showTopBar })] }) }));
8
8
  };
@@ -23,7 +23,9 @@ export const AppHeader: React.FC<AppHeaderProps> = ({
23
23
  handleClickLogo,
24
24
  headerClassnames,
25
25
  closeText = 'Close',
26
- showTopBar
26
+ showTopBar,
27
+ showTrustpilot = false,
28
+ trustpilotHref
27
29
  }) => {
28
30
  return (
29
31
  <AppHeaderStyled className={headerClassnames}>
@@ -42,6 +44,8 @@ export const AppHeader: React.FC<AppHeaderProps> = ({
42
44
  menuList={menuList}
43
45
  userActions={userActions}
44
46
  homeUrl={homeUrl}
47
+ showTrustpilot={showTrustpilot}
48
+ trustpilotHref={trustpilotHref}
45
49
  />
46
50
 
47
51
  <MobileMenu
@@ -24,4 +24,6 @@ export interface AppHeaderProps {
24
24
  headerClassnames: string;
25
25
  closeText: string;
26
26
  showTopBar?: boolean;
27
+ showTrustpilot?: boolean;
28
+ trustpilotHref?: string;
27
29
  }
@@ -25,4 +25,6 @@ export interface AppHeaderProps {
25
25
  headerClassnames: string
26
26
  closeText: string
27
27
  showTopBar?: boolean
28
+ showTrustpilot?: boolean
29
+ trustpilotHref?: string
28
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.106.6",
3
+ "version": "7.106.7",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",