From eb5d37405ffbcc2828c5b4a4c685b89b567a2437 Mon Sep 17 00:00:00 2001 From: Jonathan Bursztyn Date: Fri, 20 Dec 2024 16:02:51 +0000 Subject: [PATCH] Transform terms-of-use from JS to TS --- .../{terms-of-use.js => terms-of-use.tsx} | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename ui/components/app/terms-of-use-popup/{terms-of-use.js => terms-of-use.tsx} (99%) diff --git a/ui/components/app/terms-of-use-popup/terms-of-use.js b/ui/components/app/terms-of-use-popup/terms-of-use.tsx similarity index 99% rename from ui/components/app/terms-of-use-popup/terms-of-use.js rename to ui/components/app/terms-of-use-popup/terms-of-use.tsx index ea15cc5666a6..b930af5fa63e 100644 --- a/ui/components/app/terms-of-use-popup/terms-of-use.js +++ b/ui/components/app/terms-of-use-popup/terms-of-use.tsx @@ -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, 'children'> { + showHeader?: boolean; +} + +export const TermsOfUse: React.FC = ({ + showHeader, + ...props +}) => { return ( { Terms of use Last update: January 1901 @@ -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. @@ -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 @@ -1069,7 +1076,3 @@ export const TermsOfUse = ({ showHeader, ...props }) => { ); }; - -TermsOfUse.propTypes = { - showHeader: PropTypes.bool, -};