Formatting

This commit is contained in:
Tickbase
2025-05-18 18:23:06 +02:00
parent bbbd7482c1
commit 81519e89b7
61 changed files with 714 additions and 775 deletions

View File

@@ -4,11 +4,11 @@ export type LoadingType = 'spinner' | 'dots' | 'progress'
export type LoadingSize = 'small' | 'medium' | 'large'
interface LoadingIndicatorProps {
size?: LoadingSize;
type?: LoadingType;
message?: string;
progress?: number;
className?: string;
size?: LoadingSize
type?: LoadingType
message?: string
progress?: number
className?: string
}
/**
@@ -34,7 +34,7 @@ const LoadingIndicator = ({
switch (type) {
case 'spinner':
return <div className="loading-spinner"></div>
case 'dots':
return (
<div className="loading-dots">
@@ -43,7 +43,7 @@ const LoadingIndicator = ({
<div className="dot dot-3"></div>
</div>
)
case 'progress':
return (
<div className="loading-progress">
@@ -53,12 +53,10 @@ const LoadingIndicator = ({
style={{ width: `${Math.min(Math.max(progress, 0), 100)}%` }}
></div>
</div>
{progress > 0 && (
<div className="progress-percentage">{Math.round(progress)}%</div>
)}
{progress > 0 && <div className="progress-percentage">{Math.round(progress)}%</div>}
</div>
)
default:
return <div className="loading-spinner"></div>
}
@@ -72,4 +70,4 @@ const LoadingIndicator = ({
)
}
export default LoadingIndicator
export default LoadingIndicator

View File

@@ -1,3 +1,3 @@
export { default as LoadingIndicator } from './LoadingIndicator';
export { default as LoadingIndicator } from './LoadingIndicator'
export type { LoadingSize, LoadingType } from './LoadingIndicator';
export type { LoadingSize, LoadingType } from './LoadingIndicator'