|
1 |
| -import React, { PropsWithChildren } from 'react'; |
2 |
| -import { css } from '@emotion/react'; |
3 |
| -import { palette, space, textSans } from '@guardian/source-foundations'; |
4 |
| -import { ExternalLink } from '@/client/components/ExternalLink'; |
5 |
| - |
6 |
| -interface TermsProps { |
7 |
| - withMarginTop?: boolean; |
8 |
| -} |
9 |
| - |
10 |
| -const termsBoxStyle = ({ withMarginTop }: TermsProps) => css` |
11 |
| - background-color: ${palette.neutral[93]}; |
12 |
| - border-radius: 4px; |
13 |
| - padding: ${space[3]}px ${space[3]}px; |
14 |
| - ${withMarginTop && `margin-top: ${space[5]}px;`} |
15 |
| -`; |
16 |
| - |
17 |
| -const termsBoxTextStyle = css` |
18 |
| - ${textSans.xsmall()} |
19 |
| - margin: 0 0 ${space[2]}px 0; |
20 |
| - &:last-of-type { |
21 |
| - margin: 0; |
22 |
| - } |
23 |
| -`; |
24 |
| - |
25 |
| -export const TermsText = ({ children }: { children: React.ReactNode }) => ( |
26 |
| - <p css={termsBoxTextStyle}>{children}</p> |
27 |
| -); |
28 |
| - |
29 |
| -const TermsLink = ({ children, href }: PropsWithChildren<{ href: string }>) => ( |
30 |
| - <ExternalLink |
31 |
| - cssOverrides={css` |
32 |
| - ${textSans.xsmall()} |
33 |
| - `} |
34 |
| - href={href} |
35 |
| - > |
36 |
| - {children} |
37 |
| - </ExternalLink> |
38 |
| -); |
39 |
| - |
40 |
| -export const TermsBox = ({ |
41 |
| - children, |
42 |
| - withMarginTop, |
43 |
| -}: PropsWithChildren<TermsProps>) => ( |
44 |
| - <div css={termsBoxStyle({ withMarginTop })}>{children}</div> |
45 |
| -); |
| 1 | +import React from 'react'; |
| 2 | +import { InformationBoxText } from './InformationBox'; |
| 3 | +import { ExternalLink } from './ExternalLink'; |
46 | 4 |
|
47 | 5 | export const GuardianTerms = () => (
|
48 |
| - <TermsText> |
| 6 | + <InformationBoxText> |
49 | 7 | By proceeding, you agree to our{' '}
|
50 |
| - <TermsLink href="https://www.theguardian.com/help/terms-of-service"> |
| 8 | + <ExternalLink href="https://www.theguardian.com/help/terms-of-service"> |
51 | 9 | terms & conditions
|
52 |
| - </TermsLink> |
| 10 | + </ExternalLink> |
53 | 11 | . For information about how we use your data, see our{' '}
|
54 |
| - <TermsLink href="https://www.theguardian.com/help/privacy-policy"> |
| 12 | + <ExternalLink href="https://www.theguardian.com/help/privacy-policy"> |
55 | 13 | privacy policy
|
56 |
| - </TermsLink> |
| 14 | + </ExternalLink> |
57 | 15 | .
|
58 |
| - </TermsText> |
| 16 | + </InformationBoxText> |
59 | 17 | );
|
60 | 18 |
|
61 | 19 | export const JobsTerms = () => (
|
62 |
| - <TermsText> |
| 20 | + <InformationBoxText> |
63 | 21 | By proceeding, you agree to our{' '}
|
64 |
| - <TermsLink href="https://jobs.theguardian.com/terms-and-conditions/"> |
| 22 | + <ExternalLink href="https://jobs.theguardian.com/terms-and-conditions/"> |
65 | 23 | Guardian Jobs terms & conditions
|
66 |
| - </TermsLink> |
| 24 | + </ExternalLink> |
67 | 25 | . For information about how we use your data, see our{' '}
|
68 |
| - <TermsLink href="https://jobs.theguardian.com/privacy-policy/"> |
| 26 | + <ExternalLink href="https://jobs.theguardian.com/privacy-policy/"> |
69 | 27 | Guardian Jobs privacy policy
|
70 |
| - </TermsLink> |
| 28 | + </ExternalLink> |
71 | 29 | .
|
72 |
| - </TermsText> |
| 30 | + </InformationBoxText> |
73 | 31 | );
|
74 | 32 |
|
75 | 33 | export const RecaptchaTerms = () => (
|
76 |
| - <TermsText> |
| 34 | + <InformationBoxText> |
77 | 35 | This service is protected by reCAPTCHA and the Google{' '}
|
78 |
| - <TermsLink href="https://policies.google.com/privacy"> |
| 36 | + <ExternalLink href="https://policies.google.com/privacy"> |
79 | 37 | privacy policy
|
80 |
| - </TermsLink>{' '} |
| 38 | + </ExternalLink>{' '} |
81 | 39 | and{' '}
|
82 |
| - <TermsLink href="https://policies.google.com/terms"> |
| 40 | + <ExternalLink href="https://policies.google.com/terms"> |
83 | 41 | terms of service
|
84 |
| - </TermsLink>{' '} |
| 42 | + </ExternalLink>{' '} |
85 | 43 | apply.
|
86 |
| - </TermsText> |
| 44 | + </InformationBoxText> |
87 | 45 | );
|
0 commit comments