mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 04:14:18 +00:00
✨ feat: Loading Common
This commit is contained in:
parent
21684697b5
commit
d6686b8e2d
@ -12,7 +12,6 @@
|
|||||||
0% { transform: rotate(0deg); }
|
0% { transform: rotate(0deg); }
|
||||||
100% { transform: rotate(360deg); }
|
100% { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
height: 5rem;
|
height: 5rem;
|
||||||
|
@ -3,17 +3,16 @@ import React from "react";
|
|||||||
import s from './LoadingCommon.module.scss'
|
import s from './LoadingCommon.module.scss'
|
||||||
|
|
||||||
interface LoadingCommonProps {
|
interface LoadingCommonProps {
|
||||||
visible: boolean
|
|
||||||
size?: "small" | "default" | "large",
|
size?: "small" | "default" | "large",
|
||||||
children? : React.ReactNode;
|
children? : React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LoadingCommon = ({ visible, size="default", children }: LoadingCommonProps) => {
|
const LoadingCommon = ({ size="default", children }: LoadingCommonProps) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{
|
{
|
||||||
visible && <div className={classNames(s.loadingCommon, {
|
<div className={classNames(s.loadingCommon, {
|
||||||
[s[size]]: size
|
[s[size]]: size
|
||||||
})}>
|
})}>
|
||||||
{children}
|
{children}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user