Skip to content

Commit

Permalink
feat: custom loading text for loader component
Browse files Browse the repository at this point in the history
  • Loading branch information
nahoc committed Apr 25, 2024
1 parent 75739bf commit de55863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions loader.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Image from "next/image";

export function Loader() {
export function Loader({ loadingText = "Loading…" }: { loadingText?: string }) {
return (
<div className="mx-auto flex animate-fade-in-up flex-col items-center justify-center gap-3">
<Image unoptimized height={120} width={128} src="/loading.gif" alt="Loading" />
<p className="text-sm">Loading…</p>
<p className="text-sm">{loadingText}</p>
</div>
);
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risc0/ui",
"version": "0.0.51",
"version": "0.0.52",
"sideEffects": false,
"type": "module",
"scripts": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"clsx": "2.1.1",
"cmdk": "0.2.0",
"lodash-es": "4.17.21",
"lucide-react": "0.372.0",
"lucide-react": "0.373.0",
"next-themes": "0.3.0",
"react-hook-form": "7.51.3",
"sonner": "1.4.41",
Expand Down

0 comments on commit de55863

Please sign in to comment.