refactor(client): slim-width-row to TypeScript

This commit is contained in:
Marlon Johnson
2021-06-20 00:38:43 -07:00
parent 18875e693d
commit 05e069555a

View File

@ -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 (
<Row {...restProps}>
<Col md={6} mdOffset={3} sm={12}>
@ -13,8 +18,5 @@ function SlimWidthRow({ children, ...restProps }) {
}
SlimWidthRow.displayName = 'SlimWidthRow';
SlimWidthRow.propTypes = {
children: PropTypes.any
};
export default SlimWidthRow;