Skip to content

Commit

Permalink
udpates icon size + adds message props
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-lem committed Jul 4, 2024
1 parent 3904bd2 commit b2647aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/app/src/screens/loading-screen/loading-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import ReactLoading, { LoadingType } from "react-loading";

interface Props {
size?: string | number;
message?: string;
hideText?: boolean;
className?: string;
colorClass?: string;
type?: LoadingType;
}

export default function LoadingScreen(props: Props) {
const { hideText, size, className, colorClass, type } = props;
const { hideText, message, size, className, colorClass, type } = props;

const color = colorClass ?? "!fill-custom-blue-500";

Expand All @@ -23,10 +24,10 @@ export default function LoadingScreen(props: Props) {
<ReactLoading
className={color}
type={type ?? "bars"}
height={size ?? 70}
width={size ?? 70}
height={size ?? 40}
width={size ?? 40}
/>
{!hideText && <div className="text-xl mt-2">Just a moment</div>}
{!hideText && <div className="text-xl mt-2">{message ?? "Just a moment"}</div>}
</div>
);
}

0 comments on commit b2647aa

Please sign in to comment.