@times-components/ts-components 1.54.2 → 1.54.4
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 +16 -0
- package/dist/components/newsletter-puff/AutoNewsletterPuff.d.ts +1 -1
- package/dist/components/newsletter-puff/InlineNewsletterPuff.d.ts +1 -1
- package/dist/components/newsletter-puff/InlineNewsletterPuff.js +3 -3
- package/dist/components/newsletter-puff/__tests__/AutoNewsletterPuff.test.js +3 -2
- package/dist/components/newsletter-puff/__tests__/InlineNewsletterPuff.test.js +4 -4
- package/dist/components/newsletter-puff/newsletter-puff-button/NewsletterPuffButton.js +4 -4
- package/dist/components/newsletter-puff/newsletter-puff-button/__tests__/NewsletterPuffButton.test.js +2 -2
- package/dist/components/newsletter-puff/newsletter-puff-button/styles.d.ts +2 -15
- package/dist/components/newsletter-puff/newsletter-puff-button/styles.js +33 -16
- package/dist/components/newsletter-puff/newsletter-puff-link/NewsletterPuffLink.js +4 -2
- package/dist/components/newsletter-puff/newsletter-puff-link/__tests__/NewsletterPuffLink.test.js +1 -1
- package/dist/components/newsletter-puff/styles.js +5 -1
- package/package.json +13 -13
- package/rnw.js +1 -1
- package/src/components/newsletter-puff/AutoNewsletterPuff.tsx +1 -1
- package/src/components/newsletter-puff/InlineNewsletterPuff.tsx +3 -3
- package/src/components/newsletter-puff/__tests__/AutoNewsletterPuff.test.tsx +2 -1
- package/src/components/newsletter-puff/__tests__/InlineNewsletterPuff.test.tsx +4 -4
- package/src/components/newsletter-puff/__tests__/__snapshots__/AutoNewsletterPuff.test.tsx.snap +4 -4
- package/src/components/newsletter-puff/__tests__/__snapshots__/InlineNewsletterPuff.test.tsx.snap +36 -39
- package/src/components/newsletter-puff/newsletter-puff-button/NewsletterPuffButton.tsx +4 -9
- package/src/components/newsletter-puff/newsletter-puff-button/__tests__/NewsletterPuffButton.test.tsx +2 -2
- package/src/components/newsletter-puff/newsletter-puff-button/styles.ts +32 -15
- package/src/components/newsletter-puff/newsletter-puff-link/NewsletterPuffLink.tsx +6 -3
- package/src/components/newsletter-puff/newsletter-puff-link/__tests__/NewsletterPuffLink.test.tsx +1 -1
- package/src/components/newsletter-puff/preview-newsletter-puff/__tests__/__snapshots__/PreviewNewsletterPuff.test.tsx.snap +4 -5
- package/src/components/newsletter-puff/styles.ts +4 -0
- package/src/types/externs.d.ts +5 -0
- package/dist/helpers/text-formatting/CapitaliseFirstCharacter.d.ts +0 -1
- package/dist/helpers/text-formatting/CapitaliseFirstCharacter.js +0 -9
- package/dist/helpers/text-formatting/__tests__/CapitaliseFirstCharacter.test.d.ts +0 -1
- package/dist/helpers/text-formatting/__tests__/CapitaliseFirstCharacter.test.js +0 -12
- package/src/helpers/text-formatting/CapitaliseFirstCharacter.ts +0 -9
- package/src/helpers/text-formatting/__tests__/CapitaliseFirstCharacter.test.tsx +0 -13
|
@@ -4,18 +4,18 @@ import { Mutation } from 'react-apollo';
|
|
|
4
4
|
import { GetNewsletter } from '@times-components/provider';
|
|
5
5
|
import { subscribeNewsletter as subscribeNewsletterMutation } from '@times-components/provider-queries';
|
|
6
6
|
import { Placeholder } from '@times-components/image';
|
|
7
|
+
import { capitalise } from '@times-components/utils';
|
|
7
8
|
|
|
8
9
|
import { Newsletter } from './newsletter/Newsletter';
|
|
9
10
|
|
|
10
11
|
import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextProvider';
|
|
11
|
-
import { capitaliseFirstCharacter } from '../../helpers/text-formatting/CapitaliseFirstCharacter';
|
|
12
12
|
|
|
13
13
|
import { InpContainer } from './styles';
|
|
14
14
|
|
|
15
15
|
type InlineNewsletterPuffProps = {
|
|
16
16
|
copy: string;
|
|
17
17
|
headline: string;
|
|
18
|
-
section
|
|
18
|
+
section: string;
|
|
19
19
|
code: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -78,7 +78,7 @@ export const InlineNewsletterPuff = ({
|
|
|
78
78
|
{({ intersectObserverRef }) => (
|
|
79
79
|
<Newsletter
|
|
80
80
|
intersectObserverRef={intersectObserverRef}
|
|
81
|
-
section={
|
|
81
|
+
section={capitalise(section)}
|
|
82
82
|
justSubscribed={justSubscribed}
|
|
83
83
|
headline={headline}
|
|
84
84
|
updatingSubscription={updatingSubscription}
|
|
@@ -97,13 +97,13 @@ describe('Inline Newsletter Puff', () => {
|
|
|
97
97
|
|
|
98
98
|
it('renders signup state', async () => {
|
|
99
99
|
const component = renderComponent();
|
|
100
|
-
await component.findAllByText('One
|
|
100
|
+
await component.findAllByText('One-click sign-up');
|
|
101
101
|
expect(component.baseElement).toMatchSnapshot();
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
it('renders loading state state', async () => {
|
|
105
105
|
const component = renderComponent();
|
|
106
|
-
const oneClickSignUp = await component.findAllByText('One
|
|
106
|
+
const oneClickSignUp = await component.findAllByText('One-click sign-up');
|
|
107
107
|
|
|
108
108
|
fireEvent.click(oneClickSignUp[0]);
|
|
109
109
|
expect(component.baseElement).toMatchSnapshot();
|
|
@@ -155,11 +155,11 @@ describe('Inline Newsletter Puff', () => {
|
|
|
155
155
|
window.IntersectionObserver = oldIntersectionObserver;
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
-
it('One
|
|
158
|
+
it('One-click sign-up : displayed', async () => {
|
|
159
159
|
const analyticsStream = jest.fn();
|
|
160
160
|
const component = renderComponent(analyticsStream);
|
|
161
161
|
|
|
162
|
-
await component.findAllByText('One
|
|
162
|
+
await component.findAllByText('One-click sign-up');
|
|
163
163
|
|
|
164
164
|
FakeIntersectionObserver.intersect();
|
|
165
165
|
|
package/src/components/newsletter-puff/__tests__/__snapshots__/AutoNewsletterPuff.test.tsx.snap
CHANGED
|
@@ -6,7 +6,7 @@ exports[`<AutoNewsletterPuff> display function always renders 1`] = `
|
|
|
6
6
|
style="display: block;"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="sc-
|
|
9
|
+
class="sc-htpNat sc-ifAKCX kVAWuv"
|
|
10
10
|
style="height: 257px;"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
@@ -45,7 +45,7 @@ exports[`<AutoNewsletterPuff> display function doesnt render without consent 1`]
|
|
|
45
45
|
style="display: none;"
|
|
46
46
|
>
|
|
47
47
|
<div
|
|
48
|
-
class="sc-
|
|
48
|
+
class="sc-htpNat sc-ifAKCX kVAWuv"
|
|
49
49
|
style="height: 257px;"
|
|
50
50
|
>
|
|
51
51
|
<div
|
|
@@ -84,7 +84,7 @@ exports[`<AutoNewsletterPuff> using a display function [1, 3] count = 1 1`] = `
|
|
|
84
84
|
style="display: block;"
|
|
85
85
|
>
|
|
86
86
|
<div
|
|
87
|
-
class="sc-
|
|
87
|
+
class="sc-htpNat sc-ifAKCX kVAWuv"
|
|
88
88
|
style="height: 257px;"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
@@ -123,7 +123,7 @@ exports[`<AutoNewsletterPuff> using a display function [1, 3] count = 2 1`] = `
|
|
|
123
123
|
style="display: none;"
|
|
124
124
|
>
|
|
125
125
|
<div
|
|
126
|
-
class="sc-
|
|
126
|
+
class="sc-htpNat sc-ifAKCX kVAWuv"
|
|
127
127
|
style="height: 257px;"
|
|
128
128
|
>
|
|
129
129
|
<div
|
package/src/components/newsletter-puff/__tests__/__snapshots__/InlineNewsletterPuff.test.tsx.snap
CHANGED
|
@@ -4,56 +4,55 @@ exports[`Inline Newsletter Puff renders loading state state 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
class="sc-
|
|
7
|
+
class="sc-htpNat sc-ifAKCX iWYiTB"
|
|
8
8
|
>
|
|
9
9
|
<div
|
|
10
|
-
class="sc-
|
|
10
|
+
class="sc-htpNat sc-bZQynM fcQclH"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
-
class="sc-
|
|
13
|
+
class="sc-htpNat sc-htoDjs bnLiNW"
|
|
14
14
|
>
|
|
15
15
|
<div
|
|
16
|
-
class="sc-
|
|
16
|
+
class="sc-gzVnrw TDlzj"
|
|
17
17
|
/>
|
|
18
18
|
<div
|
|
19
|
-
class="sc-
|
|
19
|
+
class="sc-gzVnrw TDlzj"
|
|
20
20
|
/>
|
|
21
21
|
<div
|
|
22
|
-
class="sc-
|
|
22
|
+
class="sc-gzVnrw TDlzj"
|
|
23
23
|
/>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
<div
|
|
27
|
-
class="sc-
|
|
27
|
+
class="sc-htpNat sc-iwsKbI cuimXU"
|
|
28
28
|
>
|
|
29
29
|
<div
|
|
30
|
-
class="sc-
|
|
30
|
+
class="sc-bxivhb sc-gqjmRU imXojB"
|
|
31
31
|
>
|
|
32
32
|
<div
|
|
33
|
-
class="sc-
|
|
33
|
+
class="sc-bxivhb sc-gZMcBi kRYdQT"
|
|
34
34
|
>
|
|
35
35
|
Politics. Explained.
|
|
36
36
|
:
|
|
37
37
|
</div>
|
|
38
38
|
Sign up to receive our brilliant Red Box newsletter, Matt Chorley\`s poke at politics delivered every weekday morning at 8am.
|
|
39
39
|
<div
|
|
40
|
-
class="sc-
|
|
40
|
+
class="sc-htpNat sc-VigVT cSaWjg"
|
|
41
41
|
>
|
|
42
42
|
<button
|
|
43
|
-
class="sc-
|
|
43
|
+
class="sc-bwzfXH gHDjoa"
|
|
44
44
|
>
|
|
45
|
-
One
|
|
45
|
+
One-click sign-up
|
|
46
46
|
</button>
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="sc-
|
|
50
|
+
class="sc-htpNat sc-VigVT iWOUWL"
|
|
51
51
|
>
|
|
52
52
|
<button
|
|
53
|
-
|
|
54
|
-
type="button"
|
|
53
|
+
class="sc-bdVaJa qlAqK"
|
|
55
54
|
>
|
|
56
|
-
One
|
|
55
|
+
One-click sign-up
|
|
57
56
|
</button>
|
|
58
57
|
</div>
|
|
59
58
|
</div>
|
|
@@ -72,7 +71,7 @@ exports[`Inline Newsletter Puff renders placeholder when loading 1`] = `
|
|
|
72
71
|
<body>
|
|
73
72
|
<div>
|
|
74
73
|
<div
|
|
75
|
-
class="sc-
|
|
74
|
+
class="sc-htpNat sc-ifAKCX kVAWuv"
|
|
76
75
|
style="height: 257px;"
|
|
77
76
|
>
|
|
78
77
|
<div
|
|
@@ -110,39 +109,38 @@ exports[`Inline Newsletter Puff renders signup state 1`] = `
|
|
|
110
109
|
<body>
|
|
111
110
|
<div>
|
|
112
111
|
<div
|
|
113
|
-
class="sc-
|
|
112
|
+
class="sc-htpNat sc-ifAKCX iWYiTB"
|
|
114
113
|
>
|
|
115
114
|
<div
|
|
116
|
-
class="sc-
|
|
115
|
+
class="sc-htpNat sc-iwsKbI cuimXU"
|
|
117
116
|
>
|
|
118
117
|
<div
|
|
119
|
-
class="sc-
|
|
118
|
+
class="sc-bxivhb sc-gqjmRU imXojB"
|
|
120
119
|
>
|
|
121
120
|
<div
|
|
122
|
-
class="sc-
|
|
121
|
+
class="sc-bxivhb sc-gZMcBi kRYdQT"
|
|
123
122
|
>
|
|
124
123
|
Politics. Explained.
|
|
125
124
|
:
|
|
126
125
|
</div>
|
|
127
126
|
Sign up to receive our brilliant Red Box newsletter, Matt Chorley\`s poke at politics delivered every weekday morning at 8am.
|
|
128
127
|
<div
|
|
129
|
-
class="sc-
|
|
128
|
+
class="sc-htpNat sc-VigVT cSaWjg"
|
|
130
129
|
>
|
|
131
130
|
<button
|
|
132
|
-
class="sc-
|
|
131
|
+
class="sc-bwzfXH gHDjoa"
|
|
133
132
|
>
|
|
134
|
-
One
|
|
133
|
+
One-click sign-up
|
|
135
134
|
</button>
|
|
136
135
|
</div>
|
|
137
136
|
</div>
|
|
138
137
|
<div
|
|
139
|
-
class="sc-
|
|
138
|
+
class="sc-htpNat sc-VigVT iWOUWL"
|
|
140
139
|
>
|
|
141
140
|
<button
|
|
142
|
-
|
|
143
|
-
type="button"
|
|
141
|
+
class="sc-bdVaJa qlAqK"
|
|
144
142
|
>
|
|
145
|
-
One
|
|
143
|
+
One-click sign-up
|
|
146
144
|
</button>
|
|
147
145
|
</div>
|
|
148
146
|
</div>
|
|
@@ -155,39 +153,38 @@ exports[`Inline Newsletter Puff renders signup view when not already subscribed
|
|
|
155
153
|
<body>
|
|
156
154
|
<div>
|
|
157
155
|
<div
|
|
158
|
-
class="sc-
|
|
156
|
+
class="sc-htpNat sc-ifAKCX iWYiTB"
|
|
159
157
|
>
|
|
160
158
|
<div
|
|
161
|
-
class="sc-
|
|
159
|
+
class="sc-htpNat sc-iwsKbI cuimXU"
|
|
162
160
|
>
|
|
163
161
|
<div
|
|
164
|
-
class="sc-
|
|
162
|
+
class="sc-bxivhb sc-gqjmRU imXojB"
|
|
165
163
|
>
|
|
166
164
|
<div
|
|
167
|
-
class="sc-
|
|
165
|
+
class="sc-bxivhb sc-gZMcBi kRYdQT"
|
|
168
166
|
>
|
|
169
167
|
Politics. Explained.
|
|
170
168
|
:
|
|
171
169
|
</div>
|
|
172
170
|
Sign up to receive our brilliant Red Box newsletter, Matt Chorley\`s poke at politics delivered every weekday morning at 8am.
|
|
173
171
|
<div
|
|
174
|
-
class="sc-
|
|
172
|
+
class="sc-htpNat sc-VigVT cSaWjg"
|
|
175
173
|
>
|
|
176
174
|
<button
|
|
177
|
-
class="sc-
|
|
175
|
+
class="sc-bwzfXH gHDjoa"
|
|
178
176
|
>
|
|
179
|
-
One
|
|
177
|
+
One-click sign-up
|
|
180
178
|
</button>
|
|
181
179
|
</div>
|
|
182
180
|
</div>
|
|
183
181
|
<div
|
|
184
|
-
class="sc-
|
|
182
|
+
class="sc-htpNat sc-VigVT iWOUWL"
|
|
185
183
|
>
|
|
186
184
|
<button
|
|
187
|
-
|
|
188
|
-
type="button"
|
|
185
|
+
class="sc-bdVaJa qlAqK"
|
|
189
186
|
>
|
|
190
|
-
One
|
|
187
|
+
One-click sign-up
|
|
191
188
|
</button>
|
|
192
189
|
</div>
|
|
193
190
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { buttonStyles, LinkButton } from './styles';
|
|
2
|
+
import { PuffButton, PuffLinkButton } from './styles';
|
|
4
3
|
import { useTrackingContext } from '../../../helpers/tracking/TrackingContextProvider';
|
|
5
4
|
|
|
6
5
|
type NewsletterPuffProps = {
|
|
@@ -30,15 +29,11 @@ export const NewsletterPuffButton = ({
|
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
31
|
};
|
|
32
|
+
const buttonText = 'One-click sign-up';
|
|
33
33
|
|
|
34
34
|
return style === 'button' ? (
|
|
35
|
-
<
|
|
36
|
-
title="One click sign up"
|
|
37
|
-
onPress={() => handlePress()}
|
|
38
|
-
style={buttonStyles}
|
|
39
|
-
underlayColor="transparent"
|
|
40
|
-
/>
|
|
35
|
+
<PuffButton onClick={() => handlePress()}>{buttonText}</PuffButton>
|
|
41
36
|
) : (
|
|
42
|
-
<
|
|
37
|
+
<PuffLinkButton onClick={() => handlePress()}>{buttonText}</PuffLinkButton>
|
|
43
38
|
);
|
|
44
39
|
};
|
|
@@ -26,7 +26,7 @@ describe('NewsletterPuffButton', () => {
|
|
|
26
26
|
/>
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
expect(component.getByText('One
|
|
29
|
+
expect(component.getByText('One-click sign-up'));
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
it('should track button viewed and clicked in analytics', () => {
|
|
@@ -46,7 +46,7 @@ describe('NewsletterPuffButton', () => {
|
|
|
46
46
|
</TrackingContextProvider>
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
-
const oneClickSignUp = component.getByText('One
|
|
49
|
+
const oneClickSignUp = component.getByText('One-click sign-up');
|
|
50
50
|
|
|
51
51
|
fireEvent.click(oneClickSignUp);
|
|
52
52
|
|
|
@@ -2,22 +2,34 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
import { colours, fonts } from '@times-components/ts-styleguide';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
height:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
export const PuffButton = styled.button`
|
|
6
|
+
font-family: GillSansMTStd-Medium;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
line-height: 0;
|
|
9
|
+
align-items: center;
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
border-radius: 0px;
|
|
12
|
+
color: rgb(29, 29, 27);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
height: 48px;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
min-width: 100px;
|
|
17
|
+
padding-top: 4px;
|
|
18
|
+
width: 100%;
|
|
19
|
+
border-color: rgb(29, 29, 27);
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
letter-spacing: 0.2px;
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
&:hover {
|
|
24
|
+
background-color: #e4e4e4;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:active {
|
|
28
|
+
background-color: #cccccc;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export const PuffLinkButton = styled.button`
|
|
21
33
|
color: ${colours.functional.action};
|
|
22
34
|
font-family: ${fonts.body};
|
|
23
35
|
font-size: 18px;
|
|
@@ -25,4 +37,9 @@ export const LinkButton = styled.button`
|
|
|
25
37
|
letter-spacing: -0.4px;
|
|
26
38
|
border: none;
|
|
27
39
|
background-color: white;
|
|
40
|
+
text-decoration-line: underline;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
text-decoration-line: none;
|
|
44
|
+
}
|
|
28
45
|
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Link from '@times-components/link';
|
|
3
|
+
import { HoverIcon } from '@times-components/utils';
|
|
3
4
|
|
|
4
5
|
import { TrackingContextProvider } from '../../../helpers/tracking/TrackingContextProvider';
|
|
5
6
|
|
|
@@ -36,9 +37,11 @@ export const NewsletterPuffLink = ({ onPress }: any) => {
|
|
|
36
37
|
url="https://home.thetimes.co.uk/myNews"
|
|
37
38
|
onPress={() => handlePress()}
|
|
38
39
|
>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
<HoverIcon underline={true} colour="#006699">
|
|
41
|
+
<InpPreferencesText ref={intersectObserverRef}>
|
|
42
|
+
Explore our newsletters
|
|
43
|
+
</InpPreferencesText>
|
|
44
|
+
</HoverIcon>
|
|
42
45
|
</Link>
|
|
43
46
|
);
|
|
44
47
|
}}
|
package/src/components/newsletter-puff/newsletter-puff-link/__tests__/NewsletterPuffLink.test.tsx
CHANGED
|
@@ -36,7 +36,7 @@ describe('NewsletterPuffLink', () => {
|
|
|
36
36
|
);
|
|
37
37
|
FakeIntersectionObserver.intersect();
|
|
38
38
|
|
|
39
|
-
expect(component.getByText('
|
|
39
|
+
expect(component.getByText('Explore our newsletters')!);
|
|
40
40
|
|
|
41
41
|
expect(mockedAnalyticsStream).toHaveBeenCalledWith({
|
|
42
42
|
object: 'NewsletterPuffLink',
|
|
@@ -23,9 +23,9 @@ exports[`Preview Newsletter Puff renders 1`] = `
|
|
|
23
23
|
class="sc-bdVaJa sc-htoDjs lnzLgr"
|
|
24
24
|
>
|
|
25
25
|
<button
|
|
26
|
-
class="sc-
|
|
26
|
+
class="sc-gZMcBi jWMqgP"
|
|
27
27
|
>
|
|
28
|
-
One
|
|
28
|
+
One-click sign-up
|
|
29
29
|
</button>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
@@ -33,10 +33,9 @@ exports[`Preview Newsletter Puff renders 1`] = `
|
|
|
33
33
|
class="sc-bdVaJa sc-htoDjs fqXCoz"
|
|
34
34
|
>
|
|
35
35
|
<button
|
|
36
|
-
|
|
37
|
-
type="button"
|
|
36
|
+
class="sc-iwsKbI beYQWx"
|
|
38
37
|
>
|
|
39
|
-
One
|
|
38
|
+
One-click sign-up
|
|
40
39
|
</button>
|
|
41
40
|
</div>
|
|
42
41
|
</div>
|
package/src/types/externs.d.ts
CHANGED
|
@@ -134,6 +134,11 @@ declare module '@times-components/utils' {
|
|
|
134
134
|
value: string | number
|
|
135
135
|
) => string;
|
|
136
136
|
|
|
137
|
+
export const HoverIcon: React.FC<{
|
|
138
|
+
colour?: string;
|
|
139
|
+
hoverColour?: string;
|
|
140
|
+
underline?: boolean;
|
|
141
|
+
}>;
|
|
137
142
|
export const TcView: React.FC<{ style?: React.CSSProperties }>;
|
|
138
143
|
export const TcText: React.FC<{ style?: React.CSSProperties }>;
|
|
139
144
|
export const TcScrollView: React.FC<{ style?: React.CSSProperties }>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const capitaliseFirstCharacter: (stringToCapitalise?: string | undefined) => string | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const capitaliseFirstCharacter = (stringToCapitalise) => {
|
|
2
|
-
if (!stringToCapitalise) {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
const firstCharacter = stringToCapitalise.charAt(0);
|
|
6
|
-
const restOfString = stringToCapitalise.split(firstCharacter);
|
|
7
|
-
return `${firstCharacter.toUpperCase()}${restOfString[1]}`;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FwaXRhbGlzZUZpcnN0Q2hhcmFjdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2hlbHBlcnMvdGV4dC1mb3JtYXR0aW5nL0NhcGl0YWxpc2VGaXJzdENoYXJhY3Rlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxDQUFDLGtCQUEyQixFQUFFLEVBQUU7SUFDdEUsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1FBQ3ZCLE9BQU87S0FDUjtJQUVELE1BQU0sY0FBYyxHQUFHLGtCQUFrQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNwRCxNQUFNLFlBQVksR0FBRyxrQkFBa0IsQ0FBQyxLQUFLLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDOUQsT0FBTyxHQUFHLGNBQWMsQ0FBQyxXQUFXLEVBQUUsR0FBRyxZQUFZLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQztBQUM3RCxDQUFDLENBQUMifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { capitaliseFirstCharacter } from '../CapitaliseFirstCharacter';
|
|
2
|
-
describe('capitaliseFirstCharacter()', () => {
|
|
3
|
-
it('capitalizes the first character of a string', async () => {
|
|
4
|
-
const copy = capitaliseFirstCharacter('sport');
|
|
5
|
-
expect(copy).toBe('Sport');
|
|
6
|
-
});
|
|
7
|
-
it('returns early when a string is not passed as a parameter', async () => {
|
|
8
|
-
const copy = capitaliseFirstCharacter();
|
|
9
|
-
expect(copy).toBe(undefined);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FwaXRhbGlzZUZpcnN0Q2hhcmFjdGVyLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvaGVscGVycy90ZXh0LWZvcm1hdHRpbmcvX190ZXN0c19fL0NhcGl0YWxpc2VGaXJzdENoYXJhY3Rlci50ZXN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUV2RSxRQUFRLENBQUMsNEJBQTRCLEVBQUUsR0FBRyxFQUFFO0lBQzFDLEVBQUUsQ0FBQyw2Q0FBNkMsRUFBRSxLQUFLLElBQUksRUFBRTtRQUMzRCxNQUFNLElBQUksR0FBRyx3QkFBd0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUMvQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQzdCLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLDBEQUEwRCxFQUFFLEtBQUssSUFBSSxFQUFFO1FBQ3hFLE1BQU0sSUFBSSxHQUFHLHdCQUF3QixFQUFFLENBQUM7UUFDeEMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUMvQixDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQyxDQUFDIn0=
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const capitaliseFirstCharacter = (stringToCapitalise?: string) => {
|
|
2
|
-
if (!stringToCapitalise) {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const firstCharacter = stringToCapitalise.charAt(0);
|
|
7
|
-
const restOfString = stringToCapitalise.split(firstCharacter);
|
|
8
|
-
return `${firstCharacter.toUpperCase()}${restOfString[1]}`;
|
|
9
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { capitaliseFirstCharacter } from '../CapitaliseFirstCharacter';
|
|
2
|
-
|
|
3
|
-
describe('capitaliseFirstCharacter()', () => {
|
|
4
|
-
it('capitalizes the first character of a string', async () => {
|
|
5
|
-
const copy = capitaliseFirstCharacter('sport');
|
|
6
|
-
expect(copy).toBe('Sport');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it('returns early when a string is not passed as a parameter', async () => {
|
|
10
|
-
const copy = capitaliseFirstCharacter();
|
|
11
|
-
expect(copy).toBe(undefined);
|
|
12
|
-
});
|
|
13
|
-
});
|