@nuskin/foundation-ui-components 1.6.0 → 1.7.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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/src/common/autocomplete/NsAutocomplete.styled.tsx +5 -1
  3. package/src/common/autocomplete/NsAutocomplete.tsx +19 -71
  4. package/src/common/autocomplete/helper/ClearButton.tsx +22 -0
  5. package/src/common/autocomplete/helper/SeeMoreButton.tsx +47 -0
  6. package/src/common/autocomplete/helper/renderGroupName.tsx +17 -0
  7. package/src/common/autocomplete/stories/ACWithoutClose.tsx +49 -0
  8. package/src/common/autocomplete/stories/NsAutocomplete.stories.tsx +76 -0
  9. package/src/common/autocomplete/stories/RenderAutoComplete.tsx +60 -0
  10. package/src/common/autocomplete/types.d.ts +1 -1
  11. package/src/common/card/NsBrandCard.tsx +94 -0
  12. package/src/common/card/NsCheckoutCard.tsx +92 -0
  13. package/src/common/card/NsHeroCardLevel1.tsx +106 -0
  14. package/src/common/card/NsHeroCardLevel2.tsx +126 -0
  15. package/src/common/card/NsIconText.tsx +153 -0
  16. package/src/common/card/NsLargeCard.tsx +120 -0
  17. package/src/common/card/NsMediumCard.tsx +64 -0
  18. package/src/common/card/NsPost.tsx +60 -0
  19. package/src/common/card/NsSmallFullCard.tsx +90 -0
  20. package/src/common/card/NsXLargeCard.tsx +80 -0
  21. package/src/common/card/cardSizes.ts +12 -0
  22. package/src/common/card/index.ts +10 -2
  23. package/src/common/card/specs/BrandLogo.spec.tsx +1 -1
  24. package/src/common/card/specs/NsBgCard.spec.tsx +2 -2
  25. package/src/common/card/specs/NsBrandCard.spec.tsx +97 -0
  26. package/src/common/card/specs/NsCheckoutCard.spec.tsx +50 -0
  27. package/src/common/card/specs/NsHeroCardLevel1.spec.tsx +48 -0
  28. package/src/common/card/specs/NsHeroCardLevel2.spec.tsx +51 -0
  29. package/src/common/card/specs/NsIconText.spec.tsx +28 -0
  30. package/src/common/card/specs/NsLargeCard.spec.tsx +41 -0
  31. package/src/common/card/specs/NsMediumCard.spec.tsx +35 -0
  32. package/src/common/card/specs/NsPost.spec.tsx +31 -0
  33. package/src/common/card/specs/NsSmallFullCard.spec.tsx +36 -0
  34. package/src/common/card/specs/NsXLargeCard.spec.tsx +35 -0
  35. package/src/common/card/stories/{NsBrandProductCard.stories.tsx → NsBrandCard.stories.tsx} +9 -4
  36. package/src/common/card/stories/NsCheckoutCard.stories.tsx +24 -0
  37. package/src/common/card/stories/NsHeroCardLevel1.stories.tsx +45 -0
  38. package/src/common/card/stories/NsHeroCardLevel2.stories.tsx +50 -0
  39. package/src/common/card/stories/NsIconText.stories.tsx +36 -0
  40. package/src/common/card/stories/NsLargeCard.stories.tsx +32 -0
  41. package/src/common/card/stories/NsMediumCard.stories.tsx +29 -0
  42. package/src/common/card/stories/NsPost.stories.tsx +39 -0
  43. package/src/common/card/stories/NsSmallFullCard.stories.tsx +29 -0
  44. package/src/common/card/stories/NsXLargeCard.stories.tsx +29 -0
  45. package/src/common/carousal/RenderBrand.tsx +3 -2
  46. package/src/common/input/InputWrapper.tsx +1 -1
  47. package/src/common/autocomplete/NsAutocomplete.stories.tsx +0 -108
  48. package/src/common/card/NsBrandProductCard.tsx +0 -47
  49. package/src/common/card/NsFfgCard.tsx +0 -24
  50. package/src/common/card/specs/NsBrandProductCard.spec.tsx +0 -32
  51. package/src/common/card/specs/NsFfgCard.spec.tsx +0 -33
  52. package/src/common/card/stories/NsBgCard.stories.tsx +0 -20
  53. package/src/common/card/stories/NsFfgCard.stories.tsx +0 -73
  54. package/src/common/card/styled/NsFfgStyled.tsx +0 -46
@@ -0,0 +1,106 @@
1
+ import { NsLink, NsImage } from '../';
2
+ import Box from '@mui/material/Box';
3
+ import { AdditionalProps } from '../common.types';
4
+ import { styled } from '@nuskin/foundation-theme';
5
+
6
+ type NsHeroCardLevel1Props = {
7
+ text: string;
8
+ body: string;
9
+ cardLink: { href: string; title: string };
10
+ backgroundImageUrl: string;
11
+ backgroundImageAlt: string;
12
+ onClick: () => void;
13
+ } & AdditionalProps;
14
+
15
+ const CardContainer = styled(Box)(() => {
16
+ return {
17
+ backgroundClip: 'border-box',
18
+ display: 'flex',
19
+ flexDirection: 'row' as 'row', // https://github.com/cssinjs/jss/issues/1344
20
+ wordWrap: 'break-word' as 'break-word',
21
+ position: 'relative',
22
+ overflow: 'hidden',
23
+ height: 'auto',
24
+ '.content': {
25
+ width: '50%',
26
+ height: '100%',
27
+ padding: '50px',
28
+ paddingLeft: '100px',
29
+ display: 'flex',
30
+ flexDirection: 'column' as 'column',
31
+ position: 'absolute',
32
+ top: 0,
33
+ left: 0,
34
+ boxSizing: 'border-box',
35
+ },
36
+ '.image': {
37
+ width: 'auto',
38
+ height: '100%',
39
+ display: 'block',
40
+ },
41
+ '.body-title': {
42
+ fontSize: '36px',
43
+ lineHeight: '44px',
44
+ marginBottom: '20px',
45
+ },
46
+ '.body-text': {
47
+ fontSize: '18px',
48
+ marginBottom: '20px',
49
+ },
50
+ '.action-link': {
51
+ display: 'flex',
52
+ height: '44px',
53
+ flexDirection: 'column',
54
+ justifyContent: 'center',
55
+ alignItems: 'center',
56
+ gap: '10px',
57
+ flexShrink: 0,
58
+ alignSelf: 'stretch',
59
+ backgroundColor: '#252525',
60
+ color: '#fff',
61
+ marginTop: '10px',
62
+ borderRadius: '4px',
63
+
64
+ ':hover': {
65
+ textDecoration: 'none',
66
+ backgroundColor: '#252w16',
67
+ },
68
+ },
69
+ '@media (max-width: 768px)': {
70
+ display: 'block',
71
+ height: 'auto',
72
+ backgroundColor: '#edece9',
73
+ '.content': {
74
+ position: 'static',
75
+ width: '100%',
76
+ padding: '20px',
77
+ },
78
+ },
79
+ };
80
+ });
81
+
82
+ const NsHeroCardLevel1 = ({
83
+ text,
84
+ body,
85
+ cardLink,
86
+ backgroundImageUrl,
87
+ backgroundImageAlt,
88
+ onClick,
89
+ additionalProps,
90
+ }: NsHeroCardLevel1Props) => {
91
+ return (
92
+ <CardContainer data-testid={additionalProps?.testid} onClick={onClick}>
93
+ <div className="image">
94
+ <NsImage height={'auto'} width={'100%'} alt={backgroundImageAlt} src={backgroundImageUrl} />
95
+ </div>
96
+ <div className="content">
97
+ <article className="body-title">{text}</article>
98
+ <article className="body-text">{body}</article>
99
+ <NsLink className="action-link" href={cardLink.href}>
100
+ {cardLink.title}
101
+ </NsLink>
102
+ </div>
103
+ </CardContainer>
104
+ );
105
+ };
106
+ export default NsHeroCardLevel1;
@@ -0,0 +1,126 @@
1
+ import { NsLink, NsImage, NsIcon, NsIconNameType } from '../';
2
+ import Box from '@mui/material/Box';
3
+ import { AdditionalProps } from '../common.types';
4
+ import { styled } from '@nuskin/foundation-theme';
5
+
6
+ type NsHeroCardLevel2Props = {
7
+ brand: string;
8
+ text: string;
9
+ body: string;
10
+ icon: NsIconNameType;
11
+ cardLink: { href: string; title: string };
12
+ backgroundImageUrl: string;
13
+ backgroundImageAlt: string;
14
+ onClick: () => void;
15
+ } & AdditionalProps;
16
+
17
+ const CardContainer = styled(Box)(() => {
18
+ return {
19
+ backgroundClip: 'border-box',
20
+ display: 'flex',
21
+ flexDirection: 'row' as 'row', // https://github.com/cssinjs/jss/issues/1344
22
+ wordWrap: 'break-word' as 'break-word',
23
+ position: 'relative',
24
+ overflow: 'hidden',
25
+ height: 'auto',
26
+ '.content': {
27
+ height: '100%',
28
+ padding: '50px',
29
+ display: 'flex',
30
+ flexDirection: 'column' as 'column',
31
+ position: 'absolute',
32
+ top: 0,
33
+ left: 0,
34
+ boxSizing: 'border-box',
35
+ },
36
+ '.image': {
37
+ width: 'auto',
38
+ height: '100%',
39
+ display: 'block',
40
+ },
41
+ '.brand-container': {
42
+ backgroundColor: '#fff',
43
+ width: 'fit-content',
44
+ paddingLeft: '10px',
45
+ paddingRight: '10px',
46
+ },
47
+ '.body-title': {
48
+ fontSize: '36px',
49
+ lineHeight: '44px',
50
+ marginBottom: '5px',
51
+ },
52
+ '.body-text': {
53
+ fontSize: '18px',
54
+ fontWeight: 700,
55
+ marginBottom: '5px',
56
+ },
57
+ '.cta': {
58
+ display: 'flex',
59
+ flexDirection: 'column' as 'column',
60
+ width: 'fit-content',
61
+ borderBottom: '1px solid black',
62
+ ':hover': {
63
+ opacity: '0.8',
64
+ },
65
+ },
66
+ '.action-link': {
67
+ display: 'flex',
68
+ fontWeight: 600,
69
+ ':hover': {
70
+ textDecoration: 'none',
71
+ },
72
+ },
73
+ '.icon': {
74
+ marginLeft: '10px',
75
+ },
76
+ '@media (max-width: 768px)': {
77
+ '.content': {
78
+ padding: '5%',
79
+ },
80
+ '.body-title': {
81
+ fontSize: '18px',
82
+ lineHeight: '44px',
83
+ marginBottom: '5px',
84
+ },
85
+ '.body-text': {
86
+ fontSize: '12px',
87
+ fontWeight: 700,
88
+ marginBottom: '5px',
89
+ },
90
+ },
91
+ };
92
+ });
93
+
94
+ const NsHeroCardLevel2 = ({
95
+ brand,
96
+ text,
97
+ body,
98
+ cardLink,
99
+ backgroundImageUrl,
100
+ backgroundImageAlt,
101
+ additionalProps,
102
+ icon,
103
+ onClick,
104
+ }: NsHeroCardLevel2Props) => {
105
+ return (
106
+ <CardContainer data-testid={additionalProps?.testid} onClick={onClick}>
107
+ <div className="image">
108
+ <NsImage height={'auto'} width={'100%'} alt={backgroundImageAlt} src={backgroundImageUrl} />
109
+ </div>
110
+ <div className="content">
111
+ <div className="brand-container">
112
+ <article>{brand}</article>
113
+ </div>
114
+ <article className="body-title">{text}</article>
115
+ <article className="body-text">{body}</article>
116
+ <div className="cta">
117
+ <NsLink className="action-link" href={cardLink.href}>
118
+ {cardLink.title}
119
+ <NsIcon className="icon" name={icon} />
120
+ </NsLink>
121
+ </div>
122
+ </div>
123
+ </CardContainer>
124
+ );
125
+ };
126
+ export default NsHeroCardLevel2;
@@ -0,0 +1,153 @@
1
+ import Box from '@mui/material/Box';
2
+ import { AdditionalProps } from '../common.types';
3
+ import { styled } from '@nuskin/foundation-theme';
4
+
5
+ type NsIconTextProps = {
6
+ text: string;
7
+ body: string;
8
+ } & AdditionalProps;
9
+
10
+ const CardContainer = styled(Box)(() => {
11
+ return {
12
+ backgroundClip: 'border-box',
13
+ display: 'flex',
14
+ flexDirection: 'column' as 'column',
15
+ wordWrap: 'break-word' as 'break-word',
16
+ position: 'relative',
17
+ overflow: 'hidden',
18
+ height: 'auto',
19
+ width: '222px',
20
+ backgroundColor: '#F5F5F5',
21
+ padding: '20px',
22
+ justifyContent: 'center',
23
+ gap: '30px',
24
+ '.icon': {
25
+ display: 'flex',
26
+ width: '100%',
27
+ },
28
+ '.divider': {
29
+ width: '182px',
30
+ height: '1px',
31
+ background: '#B2B2B2',
32
+ },
33
+ '.title': {
34
+ fontSize: '26px',
35
+ fontWeight: 400,
36
+ marginTop: '-10px',
37
+ },
38
+ '.text': {
39
+ fontWeight: 400,
40
+ fontSize: '14px',
41
+ },
42
+ };
43
+ });
44
+
45
+ const NsIconText = ({ text, body, additionalProps }: NsIconTextProps) => {
46
+ return (
47
+ <CardContainer data-testid={additionalProps?.testid}>
48
+ <div className="icon">
49
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80" fill="none">
50
+ <path
51
+ d="M40 80C62.0914 80 80 62.0914 80 40C80 17.9086 62.0914 0 40 0C17.9086 0 0 17.9086 0 40C0 62.0914 17.9086 80 40 80Z"
52
+ fill="white"
53
+ />
54
+ <path
55
+ opacity="0.3"
56
+ d="M43.7138 75.6844C62.5411 73.4233 73.528 54.1872 57.8386 44.0119C46.8517 37.2284 19.7234 38.6174 17.646 51.4899C15.0035 67.8672 29.589 77.9456 43.7138 75.6844Z"
57
+ fill="#F56767"
58
+ />
59
+ <path
60
+ d="M2.66699 40.4277H77.5603"
61
+ stroke="#252525"
62
+ stroke-width="2"
63
+ stroke-linecap="round"
64
+ stroke-linejoin="round"
65
+ />
66
+ <path
67
+ d="M16 60H64"
68
+ stroke="#252525"
69
+ stroke-width="2"
70
+ stroke-linecap="round"
71
+ stroke-linejoin="round"
72
+ stroke-dasharray="5 5"
73
+ />
74
+ <path
75
+ d="M25.333 69.334L54.6663 69.334"
76
+ stroke="#252525"
77
+ stroke-width="2"
78
+ stroke-linecap="round"
79
+ stroke-linejoin="round"
80
+ stroke-dasharray="7 7"
81
+ />
82
+ <path
83
+ d="M8 48.9556C9.73125 51.1044 23.5567 54.3276 41.6428 49.4257C58.2309 44.9938 70.7303 46.8336 73.3333 48.5258"
84
+ stroke="#252525"
85
+ stroke-width="2"
86
+ stroke-linecap="round"
87
+ stroke-linejoin="round"
88
+ />
89
+ <path
90
+ d="M24 22.668V25.3346"
91
+ stroke="#252525"
92
+ stroke-width="2"
93
+ stroke-linecap="round"
94
+ stroke-linejoin="round"
95
+ />
96
+ <path
97
+ d="M24 33.334V36.0007"
98
+ stroke="#252525"
99
+ stroke-width="2"
100
+ stroke-linecap="round"
101
+ stroke-linejoin="round"
102
+ />
103
+ <path
104
+ d="M50.6665 12V14.6667"
105
+ stroke="#252525"
106
+ stroke-width="2"
107
+ stroke-linecap="round"
108
+ stroke-linejoin="round"
109
+ />
110
+ <path
111
+ d="M50.6665 22.666V25.3327"
112
+ stroke="#252525"
113
+ stroke-width="2"
114
+ stroke-linecap="round"
115
+ stroke-linejoin="round"
116
+ />
117
+ <path
118
+ d="M17.3335 29.332H20.0002"
119
+ stroke="#252525"
120
+ stroke-width="2"
121
+ stroke-linecap="round"
122
+ stroke-linejoin="round"
123
+ />
124
+ <path
125
+ d="M28 29.332H30.6667"
126
+ stroke="#252525"
127
+ stroke-width="2"
128
+ stroke-linecap="round"
129
+ stroke-linejoin="round"
130
+ />
131
+ <path
132
+ d="M44 18.668H46.6667"
133
+ stroke="#252525"
134
+ stroke-width="2"
135
+ stroke-linecap="round"
136
+ stroke-linejoin="round"
137
+ />
138
+ <path
139
+ d="M54.6665 18.668H57.3332"
140
+ stroke="#252525"
141
+ stroke-width="2"
142
+ stroke-linecap="round"
143
+ stroke-linejoin="round"
144
+ />
145
+ </svg>
146
+ </div>
147
+ <article className="title">{text}</article>
148
+ <div className="divider"></div>
149
+ <article className="text">{body}</article>
150
+ </CardContainer>
151
+ );
152
+ };
153
+ export default NsIconText;
@@ -0,0 +1,120 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@nuskin/foundation-theme';
3
+ import { NsButton, NsIcon, NsImage, NsLink, NsIconNameType } from '..';
4
+
5
+ type NsLargeCardProps = {
6
+ title: string;
7
+ subtitle: string;
8
+ intro: string;
9
+ icon: NsIconNameType;
10
+ backgroundImageUrl: string;
11
+ backgroundImageAlt: string;
12
+ cardLink: { href: string; title: string };
13
+ isHorizontal?: boolean;
14
+ };
15
+
16
+ const CardContainer = styled((props: any) => <Box {...props} />)(({ isHorizontal }) => {
17
+ let width = 'fit-content',
18
+ paddingLeft = '0px',
19
+ justifyContent,
20
+ fontSizeSub = '11px',
21
+ fontSizeTitle = '26px';
22
+
23
+ if (isHorizontal) {
24
+ width = '400px';
25
+ paddingLeft = '30px';
26
+ justifyContent = 'space-around';
27
+ fontSizeSub = '16px';
28
+ fontSizeTitle = '36px';
29
+ }
30
+ let direction = isHorizontal ? ('row' as 'row') : ('column' as 'column');
31
+
32
+ return {
33
+ display: 'flex',
34
+ flexDirection: direction,
35
+ position: 'relative',
36
+ '.image': {
37
+ width: '375px',
38
+ height: '392px',
39
+ objectFit: 'cover',
40
+ },
41
+ '.content': {
42
+ display: 'flex',
43
+ flexDirection: 'column',
44
+ width,
45
+ paddingLeft,
46
+ justifyContent,
47
+ },
48
+ '.subtitle': {
49
+ fontSize: fontSizeSub,
50
+ fontWeight: '400',
51
+ marginTop: '10px',
52
+ },
53
+ '.title': {
54
+ fontSize: fontSizeTitle,
55
+ fontWeight: '400',
56
+ marginTop: '10px',
57
+ },
58
+ '.cta': {
59
+ display: 'flex',
60
+ flexDirection: 'column' as 'column',
61
+ width: 'fit-content',
62
+ borderBottom: '1px solid black',
63
+ ':hover': {
64
+ opacity: '0.8',
65
+ },
66
+ },
67
+ '.action-link': {
68
+ marginTop: '10px',
69
+ display: 'flex',
70
+ fontWeight: 600,
71
+ ':hover': {
72
+ textDecoration: 'none',
73
+ },
74
+ },
75
+ '.icon': {
76
+ marginLeft: '10px',
77
+ },
78
+ };
79
+ });
80
+
81
+ export default function NsLargeCard({
82
+ title,
83
+ subtitle,
84
+ backgroundImageUrl,
85
+ backgroundImageAlt,
86
+ cardLink,
87
+ intro,
88
+ icon,
89
+ isHorizontal,
90
+ }: NsLargeCardProps) {
91
+ return (
92
+ <CardContainer role="large-card" component="div" data-testid="large-card" isHorizontal={isHorizontal}>
93
+ <NsImage alt={backgroundImageAlt} src={backgroundImageUrl} className="image" />
94
+ <div className="content">
95
+ <article className="subtitle">{subtitle}</article>
96
+ <article className="title">{title}</article>
97
+ <article className="subtitle">{intro}</article>
98
+ {isHorizontal ? (
99
+ <div className="cta">
100
+ <NsLink className="action-link" href={cardLink.href}>
101
+ {cardLink.title}
102
+ <NsIcon className="icon" name={icon} />
103
+ </NsLink>
104
+ </div>
105
+ ) : (
106
+ <NsButton
107
+ className="action-link"
108
+ variant="outlined"
109
+ color="primary"
110
+ href={cardLink.href}
111
+ fullWidth={false}
112
+ darkModeEnabled={false}
113
+ >
114
+ {cardLink.title}
115
+ </NsButton>
116
+ )}
117
+ </div>
118
+ </CardContainer>
119
+ );
120
+ }
@@ -0,0 +1,64 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@nuskin/foundation-theme';
3
+ import { NsButton, NsImage } from '..';
4
+
5
+ type NsMediumCardProps = {
6
+ title: string;
7
+ subtitle: string;
8
+ backgroundImageUrl: string;
9
+ backgroundImageAlt: string;
10
+ cardLink: { href: string; title: string };
11
+ };
12
+
13
+ const CardContainer = styled(Box)(() => {
14
+ return {
15
+ display: 'flex',
16
+ flexDirection: 'column',
17
+ position: 'relative',
18
+ '.image': {
19
+ width: '300px',
20
+ height: '300px',
21
+ objectFit: 'cover',
22
+ },
23
+ '.content': {
24
+ display: 'flex',
25
+ flexDirection: 'column',
26
+ },
27
+ '.subtitle': {
28
+ fontSize: '11px',
29
+ fontWeight: '400',
30
+ marginTop: '10px',
31
+ },
32
+ '.title': {
33
+ fontSize: '16px',
34
+ fontWeight: '400',
35
+ marginTop: '10px',
36
+ },
37
+ '.action-link': {
38
+ marginTop: '10px',
39
+ fontSize: '14px',
40
+ alignSelf: 'start',
41
+ },
42
+ };
43
+ });
44
+
45
+ export default function NsMediumCard({
46
+ title,
47
+ subtitle,
48
+ backgroundImageUrl,
49
+ backgroundImageAlt,
50
+ cardLink,
51
+ }: NsMediumCardProps) {
52
+ return (
53
+ <CardContainer role="medium-card" component="div" data-testid="medium-card">
54
+ <NsImage alt={backgroundImageAlt} src={backgroundImageUrl} className="image" />
55
+ <div className="content">
56
+ <article className="title">{title}</article>
57
+ <article className="subtitle">{subtitle}</article>
58
+ <NsButton className="action-link" variant="outlined" color="primary" href={cardLink.href}>
59
+ {cardLink.title}
60
+ </NsButton>
61
+ </div>
62
+ </CardContainer>
63
+ );
64
+ }
@@ -0,0 +1,60 @@
1
+ import Box from '@mui/material/Box';
2
+ import { NsImage } from '../';
3
+ import { AdditionalProps } from '../common.types';
4
+ import { styled } from '@nuskin/foundation-theme';
5
+
6
+ type NsPostProps = {
7
+ text: string;
8
+ body: string;
9
+ backgroundImageUrl: string;
10
+ backgroundImageAlt: string;
11
+ } & AdditionalProps;
12
+
13
+ const CardContainer = styled(Box)(() => {
14
+ return {
15
+ backgroundClip: 'border-box',
16
+ display: 'flex',
17
+ flexDirection: 'column' as 'column', // https://github.com/cssinjs/jss/issues/1344
18
+ wordWrap: 'break-word' as 'break-word',
19
+ position: 'relative',
20
+ overflow: 'hidden',
21
+ height: 'auto',
22
+ width: '165px',
23
+ backgroundColor: '#fff',
24
+ '.image': {
25
+ width: '100%',
26
+ height: '180px',
27
+ display: 'block',
28
+ },
29
+ '.content': {
30
+ padding: '20px',
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ },
34
+ '.body-title': {
35
+ fontSize: '18px',
36
+ marginBottom: '5px',
37
+ fontWeight: 600,
38
+ },
39
+ '.body-text': {
40
+ fontSize: '12px',
41
+ color: '#8C8C8C',
42
+ marginBottom: '5px',
43
+ },
44
+ };
45
+ });
46
+
47
+ const NsPost = ({ text, body, backgroundImageUrl, backgroundImageAlt, additionalProps }: NsPostProps) => {
48
+ return (
49
+ <CardContainer data-testid={additionalProps?.testid}>
50
+ <div className="image">
51
+ <NsImage height="auto" width="100%" alt={backgroundImageAlt} src={backgroundImageUrl} />
52
+ </div>
53
+ <div className="content">
54
+ <article className="body-title">{text}</article>
55
+ <article className="body-text">{body}</article>
56
+ </div>
57
+ </CardContainer>
58
+ );
59
+ };
60
+ export default NsPost;