@times-components/ts-components 1.125.1 → 1.127.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/CHANGELOG.md +22 -0
- package/dist/components/cta-button/CtaButton.d.ts +1 -0
- package/dist/components/cta-button/CtaButton.js +8 -4
- package/dist/components/quizle-sidebar/QuizleSidebar.js +3 -3
- package/dist/components/quizle-sidebar/__tests__/index.test.js +3 -3
- package/package.json +3 -3
- package/rnw.js +1 -1
- package/src/components/cta-button/CtaButton.tsx +10 -3
- package/src/components/quizle-sidebar/QuizleSidebar.tsx +5 -2
- package/src/components/quizle-sidebar/__tests__/index.test.tsx +2 -2
|
@@ -6,15 +6,14 @@ interface AttributesProps {
|
|
|
6
6
|
url: string;
|
|
7
7
|
target?: string;
|
|
8
8
|
text: string;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
interface RootProps {
|
|
12
13
|
attributes?: AttributesProps;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const CtaButton: React.FC<RootProps> =
|
|
16
|
-
const attributes = props.attributes;
|
|
17
|
-
|
|
16
|
+
export const CtaButton: React.FC<RootProps> = ({ attributes }) => {
|
|
18
17
|
if (!attributes || !attributes.text.trim() || !attributes.url.trim()) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
|
@@ -23,6 +22,7 @@ export const CtaButton: React.FC<RootProps> = props => {
|
|
|
23
22
|
<Link
|
|
24
23
|
href={attributes.url}
|
|
25
24
|
target={attributes.target || '_blank'}
|
|
25
|
+
className={attributes.className}
|
|
26
26
|
onClick={() =>
|
|
27
27
|
tealiumTrackingHandler(
|
|
28
28
|
'affiliate cta clicked',
|
|
@@ -33,6 +33,13 @@ export const CtaButton: React.FC<RootProps> = props => {
|
|
|
33
33
|
)
|
|
34
34
|
}
|
|
35
35
|
rel="nofollow"
|
|
36
|
+
style={{
|
|
37
|
+
display:
|
|
38
|
+
attributes.className &&
|
|
39
|
+
attributes.className.includes('js-cta-experiment-variation')
|
|
40
|
+
? 'none'
|
|
41
|
+
: 'block'
|
|
42
|
+
}}
|
|
36
43
|
>
|
|
37
44
|
{attributes.text}
|
|
38
45
|
</Link>
|
|
@@ -79,7 +79,7 @@ export const QuizleSidebar: FC<QuizleSideBarProps> = ({
|
|
|
79
79
|
onClick={() =>
|
|
80
80
|
handleClick(
|
|
81
81
|
fireAnalyticsEvent,
|
|
82
|
-
'quizle sidebar:
|
|
82
|
+
'quizle sidebar: title selected'
|
|
83
83
|
)
|
|
84
84
|
}
|
|
85
85
|
className="trigger"
|
|
@@ -102,7 +102,10 @@ export const QuizleSidebar: FC<QuizleSideBarProps> = ({
|
|
|
102
102
|
<Link
|
|
103
103
|
href={pageLink}
|
|
104
104
|
onClick={() =>
|
|
105
|
-
handleClick(
|
|
105
|
+
handleClick(
|
|
106
|
+
fireAnalyticsEvent,
|
|
107
|
+
'quizle sidebar: test your knowledge'
|
|
108
|
+
)
|
|
106
109
|
}
|
|
107
110
|
className="quizle-link"
|
|
108
111
|
>
|
|
@@ -47,7 +47,7 @@ describe('QuizleSidebar', () => {
|
|
|
47
47
|
action: 'Clicked',
|
|
48
48
|
attrs: {
|
|
49
49
|
event_navigation_action: 'navigation',
|
|
50
|
-
event_navigation_name: 'quizle sidebar:
|
|
50
|
+
event_navigation_name: 'quizle sidebar: title selected',
|
|
51
51
|
event_navigation_browsing_method: 'click',
|
|
52
52
|
component_name: 'Quizle Sidebar'
|
|
53
53
|
}
|
|
@@ -63,7 +63,7 @@ describe('QuizleSidebar', () => {
|
|
|
63
63
|
action: 'Clicked',
|
|
64
64
|
attrs: {
|
|
65
65
|
event_navigation_action: 'navigation',
|
|
66
|
-
event_navigation_name: 'quizle sidebar:
|
|
66
|
+
event_navigation_name: 'quizle sidebar: test your knowledge',
|
|
67
67
|
event_navigation_browsing_method: 'click',
|
|
68
68
|
component_name: 'Quizle Sidebar'
|
|
69
69
|
}
|