feat: add new spinner component

This commit is contained in:
2024-04-13 15:01:27 +07:00
parent 89f577fbef
commit ed6aca41ea
29 changed files with 177 additions and 102 deletions

View File

@@ -1,4 +1,4 @@
import { LoaderIcon } from "@lume/icons";
import { Spinner } from "@lume/ui";
import { cn } from "@lume/utils";
import { useRouteContext } from "@tanstack/react-router";
import { Dispatch, ReactNode, SetStateAction, useState } from "react";
@@ -36,7 +36,7 @@ export function AvatarUploader({
onClick={() => uploadAvatar()}
className={cn("size-4", className)}
>
{loading ? <LoaderIcon className="size-4 animate-spin" /> : children}
{loading ? <Spinner className="size-4" /> : children}
</button>
);
}

View File

@@ -1,7 +1,7 @@
import { useEffect, useRef } from "react";
import { LumeColumn } from "@lume/types";
import { invoke } from "@tauri-apps/api/core";
import { LoaderIcon } from "@lume/icons";
import { Spinner } from "@lume/ui";
export function Col({
column,
@@ -68,7 +68,7 @@ export function Col({
{column.label !== "open" ? (
<div className="w-full h-full flex items-center justify-center rounded-xl flex-col bg-black/5 dark:bg-white/5 backdrop-blur-lg">
<button type="button" className="size-5" disabled>
<LoaderIcon className="size-5 animate-spin" />
<Spinner className="size-5" />
</button>
</div>
) : null}