This commit is contained in:
yohlo
2025-10-01 13:26:42 -05:00
parent ce29c41bf3
commit 654041b6b6
18 changed files with 1381 additions and 7 deletions

View File

@@ -1,22 +1,33 @@
import { Divider, Group, Text, UnstyledButton } from "@mantine/core";
import { Divider, Group, Loader, Text, UnstyledButton } from "@mantine/core";
import { CaretRightIcon, Icon } from "@phosphor-icons/react";
interface ListButtonProps {
label: string;
Icon: Icon;
onClick: () => void;
loading?: boolean;
}
const ListButton = ({ label, onClick, Icon }: ListButtonProps) => {
const ListButton = ({ label, onClick, Icon, loading }: ListButtonProps) => {
return (
<>
<UnstyledButton w="100%" p="md" component={"button"} onClick={onClick}>
<UnstyledButton
w="100%"
p="md"
component={"button"}
onClick={onClick}
disabled={loading}
>
<Group>
<Icon weight="bold" size={20} />
<Text fw={500} size="md">
{label}
</Text>
<CaretRightIcon style={{ marginLeft: "auto" }} size={20} />
{loading ? (
<Loader size="sm" style={{ marginLeft: "auto" }} />
) : (
<CaretRightIcon style={{ marginLeft: "auto" }} size={20} />
)}
</Group>
</UnstyledButton>
<Divider />