@purpurds/content-block 7.3.0 → 7.4.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.
- package/dist/LICENSE.txt +4 -4
- package/package.json +8 -8
- package/src/content-block.stories.tsx +14 -15
package/dist/LICENSE.txt
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
Name: @purpurds/badge
|
|
2
|
-
Version: 7.
|
|
2
|
+
Version: 7.3.1
|
|
3
3
|
License: AGPL-3.0-only
|
|
4
4
|
Private: false
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Name: @purpurds/heading
|
|
9
|
-
Version: 7.
|
|
9
|
+
Version: 7.3.1
|
|
10
10
|
License: AGPL-3.0-only
|
|
11
11
|
Private: false
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
Name: @purpurds/icon
|
|
16
|
-
Version: 7.
|
|
16
|
+
Version: 7.3.1
|
|
17
17
|
License: AGPL-3.0-only
|
|
18
18
|
Private: false
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
Name: @purpurds/paragraph
|
|
23
|
-
Version: 7.
|
|
23
|
+
Version: 7.3.1
|
|
24
24
|
License: AGPL-3.0-only
|
|
25
25
|
Private: false
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/content-block",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/content-block.cjs.js",
|
|
6
6
|
"types": "./dist/content-block.d.ts",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"source": "src/content-block.tsx",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"classnames": "~2.5.0",
|
|
19
|
-
"@purpurds/badge": "7.
|
|
20
|
-
"@purpurds/
|
|
21
|
-
"@purpurds/
|
|
22
|
-
"@purpurds/
|
|
23
|
-
"@purpurds/icon": "7.
|
|
24
|
-
"@purpurds/
|
|
25
|
-
"@purpurds/
|
|
19
|
+
"@purpurds/badge": "7.4.0",
|
|
20
|
+
"@purpurds/heading": "7.4.0",
|
|
21
|
+
"@purpurds/cta-link": "7.4.0",
|
|
22
|
+
"@purpurds/grid": "7.4.0",
|
|
23
|
+
"@purpurds/icon": "7.4.0",
|
|
24
|
+
"@purpurds/tokens": "7.4.0",
|
|
25
|
+
"@purpurds/paragraph": "7.4.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"eslint": "9.24.0",
|
|
@@ -24,16 +24,6 @@ const mockData = [
|
|
|
24
24
|
imgUrl:
|
|
25
25
|
"https://www.telia.se/images/i15skfqwpurk/5YYelnwdIJGush05RYsE6A/04d4eeb571bca6d5c72b557f6da92c92/Telia_Company_Reinvention_69.jpg",
|
|
26
26
|
altText: "Familjens unga ser på tv tillsammans mysig stämning men spännande.",
|
|
27
|
-
actions: (
|
|
28
|
-
<>
|
|
29
|
-
<CtaLink href="#" variant="primary">
|
|
30
|
-
CTA link text
|
|
31
|
-
</CtaLink>
|
|
32
|
-
<CtaLink href="#" variant="secondary">
|
|
33
|
-
CTA link text
|
|
34
|
-
</CtaLink>
|
|
35
|
-
</>
|
|
36
|
-
),
|
|
37
27
|
},
|
|
38
28
|
{
|
|
39
29
|
id: "2",
|
|
@@ -58,6 +48,17 @@ const mockData = [
|
|
|
58
48
|
},
|
|
59
49
|
];
|
|
60
50
|
|
|
51
|
+
const getMockActions = (negative?: boolean) => (
|
|
52
|
+
<>
|
|
53
|
+
<CtaLink href="#" variant="primary" negative={negative}>
|
|
54
|
+
CTA link text
|
|
55
|
+
</CtaLink>
|
|
56
|
+
<CtaLink href="#" variant="secondary" negative={negative}>
|
|
57
|
+
CTA link text
|
|
58
|
+
</CtaLink>
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
|
|
61
62
|
const meta = {
|
|
62
63
|
title: "Components/ContentBlock",
|
|
63
64
|
component: ContentBlock,
|
|
@@ -102,7 +103,6 @@ type Story = StoryObj<typeof ContentBlock>;
|
|
|
102
103
|
export const Showcase: Story = {
|
|
103
104
|
args: {
|
|
104
105
|
negative: false,
|
|
105
|
-
actions: mockData[0].actions,
|
|
106
106
|
title: mockData[0].title,
|
|
107
107
|
children: mockData[0].content,
|
|
108
108
|
image: (
|
|
@@ -125,7 +125,7 @@ export const Showcase: Story = {
|
|
|
125
125
|
background: args.negative ? "var(--purpur-color-purple-900)" : "transparent",
|
|
126
126
|
}}
|
|
127
127
|
>
|
|
128
|
-
<ContentBlock {...args}>
|
|
128
|
+
<ContentBlock actions={getMockActions(args.negative)} {...args}>
|
|
129
129
|
<Paragraph negative={args.negative} variant="paragraph-100">
|
|
130
130
|
{children}
|
|
131
131
|
</Paragraph>
|
|
@@ -138,7 +138,6 @@ export const Showcase: Story = {
|
|
|
138
138
|
export const VideoContent: Story = {
|
|
139
139
|
args: {
|
|
140
140
|
negative: false,
|
|
141
|
-
actions: mockData[0].actions,
|
|
142
141
|
title: mockData[0].title,
|
|
143
142
|
children: mockData[0].content,
|
|
144
143
|
video: (
|
|
@@ -159,7 +158,7 @@ export const VideoContent: Story = {
|
|
|
159
158
|
background: args.negative ? "var(--purpur-color-purple-900)" : "transparent",
|
|
160
159
|
}}
|
|
161
160
|
>
|
|
162
|
-
<ContentBlock {...args}>
|
|
161
|
+
<ContentBlock actions={getMockActions(args.negative)} {...args}>
|
|
163
162
|
<Paragraph negative={args.negative} variant="paragraph-100">
|
|
164
163
|
{children}
|
|
165
164
|
</Paragraph>
|
|
@@ -182,7 +181,7 @@ export const ContentBlockGroup: Story = {
|
|
|
182
181
|
<ContentBlock
|
|
183
182
|
key={item.id}
|
|
184
183
|
negative={negative}
|
|
185
|
-
actions={
|
|
184
|
+
actions={getMockActions(negative)}
|
|
186
185
|
title={item.title}
|
|
187
186
|
tagline={item.tagline}
|
|
188
187
|
listItems={item.listItems}
|