Skip to content

Commit

Permalink
Transform terms-of-use from JS to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
jonybur committed Dec 20, 2024
1 parent 000cd80 commit eb5d374
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
TextVariant,
TextAlign,
Color,
TextColor,
} from '../../../helpers/constants/design-system';
import { Box, ButtonLink, Text } from '../../component-library';
import type { BoxProps } from '../../component-library/box';

export const TermsOfUse = ({ showHeader, ...props }) => {
interface TermsOfUseProps extends Omit<BoxProps<'div'>, 'children'> {
showHeader?: boolean;
}

export const TermsOfUse: React.FC<TermsOfUseProps> = ({
showHeader,
...props
}) => {
return (
<Box className="terms-of-use" {...props}>
<Box
Expand All @@ -21,7 +28,7 @@ export const TermsOfUse = ({ showHeader, ...props }) => {
<Text variant={TextVariant.headingLg}>Terms of use</Text>
<Text
variant={TextVariant.bodyMdMedium}
color={Color.textAlternative}
color={TextColor.textAlternative}
>
Last update: January 1901
</Text>
Expand Down Expand Up @@ -63,7 +70,7 @@ export const TermsOfUse = ({ showHeader, ...props }) => {
href="https://consensys.io/privacy-policy/"
target="_blank"
rel="noopener noreferrer"
color={Color.primaryDefault}
color={TextColor.primaryDefault}
variant={TextVariant.bodySm}
>
Privacy Policy.
Expand Down Expand Up @@ -1029,7 +1036,7 @@ export const TermsOfUse = ({ showHeader, ...props }) => {
href="https://consensys.io/privacy-policy"
target="_blank"
rel="noopener noreferrer"
color={Color.primaryDefault}
color={TextColor.primaryDefault}
variant={TextVariant.bodySm}
>
https://consensys.io/privacy-policy
Expand Down Expand Up @@ -1069,7 +1076,3 @@ export const TermsOfUse = ({ showHeader, ...props }) => {
</Box>
);
};

TermsOfUse.propTypes = {
showHeader: PropTypes.bool,
};

0 comments on commit eb5d374

Please sign in to comment.