@npm_leadtech/legal-lib-components 7.29.0 → 7.30.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.
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ArrowRight from '../../../../images/svg/arrow-right-24px-outlined.svg';
3
3
  import { ArticleStyled } from './Article.styled';
4
4
  import { Button } from '../../atoms';
5
- const Article = ({ imageUrl, title, articleUrl, summary, isCategoryProductPage, readMoreText }) => {
6
- return (_jsxs(ArticleStyled, { className: 'article', children: [_jsx("img", { src: imageUrl, className: isCategoryProductPage ? 'image image-category' : 'image', loading: 'lazy', alt: title }), _jsxs("div", { className: isCategoryProductPage ? 'information information-category' : 'information', children: [_jsx("a", { href: articleUrl, target: '_blank', children: _jsxs("p", { className: 'title sans-serif --big', children: [title, " "] }) }), _jsx("div", { className: 'summary', children: summary }), isCategoryProductPage ? (_jsxs("div", { className: 'button-image-container', children: [_jsx(Button, { givenClass: 'thinner-letter', color: 'tertiary', label: readMoreText, dataQa: 'article-read-more', link: articleUrl, isExternal: true }), _jsx("img", { className: 'article__arrow-right', src: ArrowRight, alt: '' })] })) : (_jsx(Button, { color: 'tertiary', label: readMoreText, dataQa: 'article-read-more', link: articleUrl, isExternal: true }))] })] }));
5
+ const Article = ({ image, title, articleUrl, summary, isCategoryProductPage, readMoreText }) => {
6
+ return (_jsxs(ArticleStyled, { className: 'article', children: [_jsx("div", { className: isCategoryProductPage ? 'image image-category' : 'image', children: image }), _jsxs("div", { className: isCategoryProductPage ? 'information information-category' : 'information', children: [_jsx("a", { href: articleUrl, target: '_blank', children: _jsxs("p", { className: 'title sans-serif --big', children: [title, " "] }) }), _jsx("div", { className: 'summary', children: summary }), isCategoryProductPage ? (_jsxs("div", { className: 'button-image-container', children: [_jsx(Button, { givenClass: 'thinner-letter', color: 'tertiary', label: readMoreText, dataQa: 'article-read-more', link: articleUrl, isExternal: true }), _jsx("img", { className: 'article__arrow-right', src: ArrowRight, alt: '' })] })) : (_jsx(Button, { color: 'tertiary', label: readMoreText, dataQa: 'article-read-more', link: articleUrl, isExternal: true }))] })] }));
7
7
  };
8
8
  export default Article;
@@ -14,11 +14,19 @@ export const ArticleStyled = styled.div `
14
14
  }
15
15
 
16
16
  .image {
17
- object-fit: cover;
18
- object-position: 25%;
19
17
  height: 13em;
20
18
  width: 100%;
21
19
 
20
+ .gatsby-image-wrapper {
21
+ height: 100%;
22
+ img {
23
+ height: 100%;
24
+ width: 100%;
25
+ object-fit: cover;
26
+ object-position: 25%;
27
+ }
28
+ }
29
+
22
30
  @media ${device['landscape-tablets']} {
23
31
  width: 35%;
24
32
  height: auto;
@@ -15,11 +15,19 @@ export const ArticleStyled = styled.div`
15
15
  }
16
16
 
17
17
  .image {
18
- object-fit: cover;
19
- object-position: 25%;
20
18
  height: 13em;
21
19
  width: 100%;
22
20
 
21
+ .gatsby-image-wrapper {
22
+ height: 100%;
23
+ img {
24
+ height: 100%;
25
+ width: 100%;
26
+ object-fit: cover;
27
+ object-position: 25%;
28
+ }
29
+ }
30
+
23
31
  @media ${device['landscape-tablets']} {
24
32
  width: 35%;
25
33
  height: auto;
@@ -6,15 +6,10 @@ import { type ArticleProps } from './ArticleProps.types'
6
6
  import { ArticleStyled } from './Article.styled'
7
7
  import { Button } from '../../atoms'
8
8
 
9
- const Article: FC<ArticleProps> = ({ imageUrl, title, articleUrl, summary, isCategoryProductPage, readMoreText }) => {
9
+ const Article: FC<ArticleProps> = ({ image, title, articleUrl, summary, isCategoryProductPage, readMoreText }) => {
10
10
  return (
11
11
  <ArticleStyled className='article'>
12
- <img
13
- src={imageUrl}
14
- className={isCategoryProductPage ? 'image image-category' : 'image'}
15
- loading='lazy'
16
- alt={title}
17
- />
12
+ <div className={isCategoryProductPage ? 'image image-category' : 'image'}>{image}</div>
18
13
  <div className={isCategoryProductPage ? 'information information-category' : 'information'}>
19
14
  <a href={articleUrl} target='_blank'>
20
15
  <p className='title sans-serif --big'>{title} </p>
@@ -1,5 +1,5 @@
1
1
  export interface ArticleProps {
2
- imageUrl: string;
2
+ image: React.ReactNode;
3
3
  title: string;
4
4
  articleUrl: string;
5
5
  summary: string;
@@ -1,5 +1,5 @@
1
1
  export interface ArticleProps {
2
- imageUrl: string
2
+ image: React.ReactNode
3
3
  title: string
4
4
  articleUrl: string
5
5
  summary: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.29.0",
3
+ "version": "7.30.0",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",