From fdbe7bfc573b70a7ba14298a27dcd2d50351ebf9 Mon Sep 17 00:00:00 2001 From: Maciej Krawczyk <63869461+wzarek@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:19:18 +0200 Subject: [PATCH] [RSN-63] - Implemented quick filters section (#49) --- Client/reasn-client/apps/web/app/page.tsx | 5 +- Client/reasn-client/package.json | 1 + .../packages/ui/src/components/Card.tsx | 8 +- .../ui/src/components/main/QuickFilters.tsx | 96 +++++++++++++++++++ Client/reasn-client/packages/ui/src/index.tsx | 1 + Client/reasn-client/yarn.lock | 8 ++ .../ReasnAPI/Models/Enums/UserRole.cs | 2 +- 7 files changed, 112 insertions(+), 9 deletions(-) create mode 100644 Client/reasn-client/packages/ui/src/components/main/QuickFilters.tsx diff --git a/Client/reasn-client/apps/web/app/page.tsx b/Client/reasn-client/apps/web/app/page.tsx index 47a2f97e..72c2b947 100644 --- a/Client/reasn-client/apps/web/app/page.tsx +++ b/Client/reasn-client/apps/web/app/page.tsx @@ -1,11 +1,12 @@ "use client"; -import { HeroSection } from "@reasn/ui/src"; +import { HeroSection, QuickFilters } from "@reasn/ui/src"; export default function Web() { return ( -
#abcd
diff --git a/Client/reasn-client/packages/ui/src/components/main/QuickFilters.tsx b/Client/reasn-client/packages/ui/src/components/main/QuickFilters.tsx new file mode 100644 index 00000000..dca663a0 --- /dev/null +++ b/Client/reasn-client/packages/ui/src/components/main/QuickFilters.tsx @@ -0,0 +1,96 @@ +import clsx from "clsx"; +import React, { useState } from "react"; +import { Card, CardVariant } from "../Card"; + +interface QuickFiltersButtonProps { + title: string; + selected?: boolean; + onClick: () => void; +} + +export const QuickFilters = () => { + const [selectedFilter, setSelectedFilter] = useState("Today"); + + return ( +