feat: /titles page with search and sort functionality. Website header added
This commit is contained in:
parent
1f5196c015
commit
86e3df2205
12 changed files with 625 additions and 155 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue