feat: Loading Common

This commit is contained in:
sonnguyenkieio 2021-09-09 08:25:28 +07:00
parent 21684697b5
commit d6686b8e2d
2 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,6 @@
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
&.small {
height: 5rem;

View File

@ -3,17 +3,16 @@ import React from "react";
import s from './LoadingCommon.module.scss'
interface LoadingCommonProps {
visible: boolean
size?: "small" | "default" | "large",
children? : React.ReactNode;
}
const LoadingCommon = ({ visible, size="default", children }: LoadingCommonProps) => {
const LoadingCommon = ({ size="default", children }: LoadingCommonProps) => {
return (
<>
{
visible && <div className={classNames(s.loadingCommon, {
<div className={classNames(s.loadingCommon, {
[s[size]]: size
})}>
{children}