mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
✨ feat: Loading Common
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
100% { transform: rotate(360deg); }
|
100% { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
height: 5rem;
|
height: 5rem;
|
||||||
width: 5rem;
|
width: 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}
|
||||||
|
Reference in New Issue
Block a user