From 068b8ba0cfeacc38e31aa6b98929f31c7dc2e1f0 Mon Sep 17 00:00:00 2001 From: criss8X Date: Wed, 20 Mar 2024 13:48:32 -0400 Subject: [PATCH 01/62] =?UTF-8?q?feat:=20Implement=20=C2=B4DirectMessageMo?= =?UTF-8?q?dal=C2=B4=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Button.tsx | 15 ++-- src/components/DirectMessageModal.tsx | 105 +++++++++++++++++++++++++ src/components/IconButton.tsx | 5 +- src/components/Input.tsx | 4 +- src/components/QuickActions.tsx | 57 -------------- src/components/SidebarActions.tsx | 79 +++++++++++++++++++ src/components/UserBar.tsx | 5 +- src/components/UserProfile.tsx | 22 ++++-- src/containers/DevPreview.tsx | 9 ++- src/hooks/matrix/useConnection.ts | 3 +- src/hooks/matrix/useSidebarActions.ts | 17 ++++ src/stories/quickActions.stories.tsx | 14 ---- src/stories/sidebarActions.stories.tsx | 18 +++++ src/views/app.tsx | 4 +- src/views/login.tsx | 21 ++++- 15 files changed, 279 insertions(+), 99 deletions(-) create mode 100644 src/components/DirectMessageModal.tsx delete mode 100644 src/components/QuickActions.tsx create mode 100644 src/components/SidebarActions.tsx create mode 100644 src/hooks/matrix/useSidebarActions.ts delete mode 100644 src/stories/quickActions.stories.tsx create mode 100644 src/stories/sidebarActions.stories.tsx diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 6b630aed..7843a450 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -25,6 +25,7 @@ export type ButtonProps = { color?: ButtonColor size?: ButtonSize isDisabled?: boolean + className?: string } const Button: FC = ({ @@ -35,17 +36,18 @@ const Button: FC = ({ variant, color, size, + className, }) => { const sizeClass = size === ButtonSize.Small - ? "p-[5px] text-xs rounded-[5px] border-[1px] px-2" - : "rounded-[10px] border-[2px] p-[10px]" + ? "p-1 text-xs rounded-md px-2" + : "rounded-xl border-[2px] p-3" const variantClass = variant === ButtonVariant.Primary - ? (color === ButtonColor.Black + ? color === ButtonColor.Black ? "bg-black border-none text-white" - : "bg-purple-700 border-purple-900 text-white") + : "bg-purple-700 border-purple-900 text-white" : variant === ButtonVariant.Secondary ? "bg-purple-100 text-purple-800 border-none hover:bg-purple-200" : variant === ButtonVariant.TextLink @@ -57,9 +59,10 @@ const Button: FC = ({ return (