added ImageCarousel component, added icons to action buttons, modified project route

This commit is contained in:
2026-01-13 00:15:08 -05:00
parent 20321ece21
commit 2d945f6015
5 changed files with 103 additions and 9 deletions

View File

@@ -1,8 +1,11 @@
import { useEffect, useRef, useState } from "preact/hooks";
import type { ComponentChildren } from "preact";
import * as hi from "jsr:@preact-icons/hi2";
export type ModalAction = {
label: string;
// deno-lint-ignore no-explicit-any
icon?: any;
onClick: () => void;
variant?: "primary" | "secondary" | "link";
};
@@ -62,6 +65,7 @@ export const ProjectModal = function ProjectModal({
...actions,
{
label: "Close",
icon: <hi.HiXCircle />,
onClick: startCloseFlow,
variant: "secondary",
},
@@ -89,7 +93,7 @@ export const ProjectModal = function ProjectModal({
const renderActionButton = (action: ModalAction) => {
const base =
"flex-1 w-full px-4 py-2 rounded-md font-semibold focus:outline-none";
"flex-1 w-full px-4 py-2 rounded-md font-semibold focus:outline-none flex items-center justify-center gap-2";
const styles =
action.variant === "primary"
? "bg-[#94e2d5] text-black hover:brightness-95 border-b-4 border-b-[#364153] shadow-xl"
@@ -104,7 +108,7 @@ export const ProjectModal = function ProjectModal({
class={`${base} ${styles}`}
type="button"
>
{action.label}
{action.icon} {action.label}
</button>
);
};