feat: /titles page with search and sort functionality. Website header added
Some checks failed
Build and Deploy Go App / build (push) Failing after 11m37s
Build and Deploy Go App / deploy (push) Has been skipped

This commit is contained in:
nihonium 2025-11-22 05:45:54 +03:00
parent 1f5196c015
commit 86e3df2205
Signed by: nihonium
GPG key ID: 0251623741027CFC
12 changed files with 625 additions and 155 deletions

View file

@ -0,0 +1,28 @@
import React from "react";
import { Squares2X2Icon, Bars3Icon } from "@heroicons/react/24/solid";
export type LayoutSwitchProps = {
layout: "square" | "horizontal"
setLayout: (value: React.SetStateAction<"square" | "horizontal">) => void
};
export function LayoutSwitch({
layout,
setLayout
}: LayoutSwitchProps) {
return (
<div className="flex justify-end">
<button
className="p-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition"
onClick={() =>
setLayout(prev => (prev === "square" ? "horizontal" : "square"))
}>
{layout === "square"
? <Squares2X2Icon className="w-6 h-6" />
: <Bars3Icon className="w-6 h-6" />
}
</button>
</div>
);
}