From 05e069555ade235a84b1f1768b2d22bbbbf207fd Mon Sep 17 00:00:00 2001 From: Marlon Johnson Date: Sun, 20 Jun 2021 00:38:43 -0700 Subject: [PATCH] refactor(client): slim-width-row to TypeScript --- client/src/components/helpers/slim-width-row.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/src/components/helpers/slim-width-row.tsx b/client/src/components/helpers/slim-width-row.tsx index 58df1f0ca0..95bcadb9d8 100644 --- a/client/src/components/helpers/slim-width-row.tsx +++ b/client/src/components/helpers/slim-width-row.tsx @@ -1,8 +1,13 @@ -import React from 'react'; -import PropTypes from 'prop-types'; +import React, { ReactNode } from 'react'; import { Row, Col } from '@freecodecamp/react-bootstrap'; -function SlimWidthRow({ children, ...restProps }) { +interface SlimWidthRowProps { + children: ReactNode; +} +function SlimWidthRow({ + children, + ...restProps +}: SlimWidthRowProps): JSX.Element { return ( @@ -13,8 +18,5 @@ function SlimWidthRow({ children, ...restProps }) { } SlimWidthRow.displayName = 'SlimWidthRow'; -SlimWidthRow.propTypes = { - children: PropTypes.any -}; export default SlimWidthRow;