@npm_leadtech/legal-lib-components 7.26.0 → 7.27.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.
@@ -43,6 +43,6 @@ const LOGOS = {
43
43
  white: lawdistrictonlineWhite
44
44
  }
45
45
  };
46
- export const Logo = ({ className, siteName = 'lawdistrict', type = 'default', width, height }) => {
47
- return (_jsx("img", { className: className, src: LOGOS[siteName.toLowerCase()][type], alt: `${siteName} logo`, width: width, height: height }));
46
+ export const Logo = ({ className, siteName = 'lawdistrict', type = 'default', width, height, isLoadingLazy = false }) => {
47
+ return (_jsx("img", { className: className, src: LOGOS[siteName.toLowerCase()][type], alt: `${siteName} logo`, width: width, height: height, loading: isLoadingLazy ? 'lazy' : 'eager' }));
48
48
  };
@@ -55,7 +55,8 @@ export const Logo: FC<LogoProps> = ({
55
55
  siteName = 'lawdistrict',
56
56
  type = 'default',
57
57
  width,
58
- height
58
+ height,
59
+ isLoadingLazy = false
59
60
  }): React.ReactElement => {
60
61
  return (
61
62
  <img
@@ -64,6 +65,7 @@ export const Logo: FC<LogoProps> = ({
64
65
  alt={`${siteName} logo`}
65
66
  width={width}
66
67
  height={height}
68
+ loading={isLoadingLazy ? 'lazy' : 'eager'}
67
69
  />
68
70
  )
69
71
  }
@@ -4,4 +4,5 @@ export interface LogoProps {
4
4
  width?: string;
5
5
  height?: string;
6
6
  type?: string;
7
+ isLoadingLazy?: boolean;
7
8
  }
@@ -4,4 +4,5 @@ export interface LogoProps {
4
4
  width?: string
5
5
  height?: string
6
6
  type?: string
7
+ isLoadingLazy?: boolean
7
8
  }
@@ -3,5 +3,5 @@ import { BottomFooterStyled, BottomFooterText, BottomFooterWrapper, CompanyLink,
3
3
  import { Logo } from '../../atoms/Logo/Logo';
4
4
  import { SocialLinks } from '../../molecules/SocialLinks';
5
5
  export const BottomFooter = ({ siteName, companyLinks, socialLinks, disclaimerText, copyrightText }) => {
6
- return (_jsx(BottomFooterWrapper, { children: _jsxs(BottomFooterStyled, { children: [_jsxs(LogoSocialsWrapper, { className: 'footer__logo', children: [_jsx(Logo, { className: 'footer__lawdistrict', siteName: siteName, width: '138', height: '24', type: 'white' }), socialLinks && _jsx(SocialLinks, { links: socialLinks })] }), _jsx("div", { children: _jsx(CompanyList, { children: companyLinks?.map((link) => (_jsx("li", { children: _jsx(CompanyLink, { href: link.url, className: 'sans-serif --extra-small', "data-qa": link.dataQa, rel: link.rel, children: link.name }) }, link.url))) }) }), _jsx(BottomFooterText, { className: 'sans-serif --extra-small', children: disclaimerText }), _jsx(BottomFooterText, { className: 'sans-serif --extra-small', children: copyrightText })] }) }));
6
+ return (_jsx(BottomFooterWrapper, { children: _jsxs(BottomFooterStyled, { children: [_jsxs(LogoSocialsWrapper, { className: 'footer__logo', children: [_jsx(Logo, { className: 'footer__lawdistrict', siteName: siteName, width: '138', height: '24', type: 'white', isLoadingLazy: true }), socialLinks && _jsx(SocialLinks, { links: socialLinks })] }), _jsx("div", { children: _jsx(CompanyList, { children: companyLinks?.map((link) => (_jsx("li", { children: _jsx(CompanyLink, { href: link.url, className: 'sans-serif --extra-small', "data-qa": link.dataQa, rel: link.rel, children: link.name }) }, link.url))) }) }), _jsx(BottomFooterText, { className: 'sans-serif --extra-small', children: disclaimerText }), _jsx(BottomFooterText, { className: 'sans-serif --extra-small', children: copyrightText })] }) }));
7
7
  };
@@ -22,7 +22,14 @@ export const BottomFooter: React.FC<BottomFooterProps> = ({
22
22
  <BottomFooterWrapper>
23
23
  <BottomFooterStyled>
24
24
  <LogoSocialsWrapper className={'footer__logo'}>
25
- <Logo className='footer__lawdistrict' siteName={siteName} width='138' height='24' type='white' />
25
+ <Logo
26
+ className='footer__lawdistrict'
27
+ siteName={siteName}
28
+ width='138'
29
+ height='24'
30
+ type='white'
31
+ isLoadingLazy
32
+ />
26
33
  {socialLinks && <SocialLinks links={socialLinks} />}
27
34
  </LogoSocialsWrapper>
28
35
  <div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.26.0",
3
+ "version": "7.27.0",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",