From a5df28fad0dae266a857ae110c43b3cb8b23c996 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 8 Apr 2022 19:41:40 +0200 Subject: refactor: use a consistent classname prop and avoid children prop I was using the FunctionComponent type for some component that do not use children. So I change the type to VoidFunctionComponent to avoid mistakes. I also rename all the "classes" or "additionalClasses" props to "className" to keep consistency between each components. --- src/components/atoms/loaders/spinner.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/atoms/loaders/spinner.tsx') diff --git a/src/components/atoms/loaders/spinner.tsx b/src/components/atoms/loaders/spinner.tsx index 57b0a43..bff0f25 100644 --- a/src/components/atoms/loaders/spinner.tsx +++ b/src/components/atoms/loaders/spinner.tsx @@ -1,8 +1,8 @@ -import { FC } from 'react'; +import { VFC } from 'react'; import { useIntl } from 'react-intl'; import styles from './spinner.module.scss'; -type SpinnerProps = { +export type SpinnerProps = { /** * The loading message. Default: "Loading...". */ @@ -14,7 +14,7 @@ type SpinnerProps = { * * Render a loading message with animation. */ -const Spinner: FC = ({ message }) => { +const Spinner: VFC = ({ message }) => { const intl = useIntl(); return ( -- cgit v1.2.3