import React, { Fragment, PropsWithChildren, FunctionComponent } from 'react';

export interface WithLoaderProps {
  loading?: boolean
}

export const WithLoader: FunctionComponent<WithLoaderProps> = ({ loading, children }) => {
  return (
    <Fragment>
      {
        loading ?
        <div>Chargement</div> :
        children
      }
    </Fragment>
  )
}