refactor(client): slim-width-row to TypeScript
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user