From 5e78ca7ce640ae10540bb7b43489ff2b7367b543 Mon Sep 17 00:00:00 2001 From: Caner Akdas Date: Tue, 21 Nov 2023 02:24:56 +0300 Subject: [PATCH] refactor: review updates --- .../Downloads/ChangelogModal/index.module.css | 127 +++++++++++------- components/Downloads/ChangelogModal/index.tsx | 22 +-- 2 files changed, 91 insertions(+), 58 deletions(-) diff --git a/components/Downloads/ChangelogModal/index.module.css b/components/Downloads/ChangelogModal/index.module.css index 67afdd47f2fa6..080705ce7ffe3 100644 --- a/components/Downloads/ChangelogModal/index.module.css +++ b/components/Downloads/ChangelogModal/index.module.css @@ -1,67 +1,98 @@ -svg { - @apply h-4 - w-4 - text-neutral-600; -} - -.dialogOverlay { +.overlay { @apply fixed inset-0 + flex + justify-center bg-white bg-opacity-90 backdrop-blur-lg - dark:bg-neutral-900 + dark:bg-neutral-950 dark:bg-opacity-80; - .dialogContent { - @apply fixed - left-[50%] - top-[40%] - inline-flex - max-h-[85vh] - w-3/4 - translate-x-[-50%] - translate-y-[-50%] - flex-col - overflow-scroll - rounded - border - border-neutral-200 - bg-white - p-12 - focus:outline-none - dark:bg-neutral-900; + .content { + @apply relative + mx-4 + my-4 + inline-flex + w-full + flex-col + overflow-scroll + rounded + border + border-neutral-200 + bg-white + p-8 + focus:outline-none + dark:bg-neutral-950 + sm:mt-20 + sm:w-1/2 + sm:p-12; + + .trigger { + @apply absolute + right-3 + top-3 + block + h-6 + w-6 + cursor-pointer + sm:hidden; + } } - .dialogTitle { + .title { @apply mb-2 - text-3xl - font-semibold - leading-9 - text-neutral-900 - dark:text-white; + text-3xl + font-semibold + text-neutral-900 + dark:text-white; } - .dialogDescription { - @apply mb-2 - font-open-sans - text-lg - font-regular - leading-normal - text-neutral-800 - dark:text-neutral-200; + .description { + @apply mb-4 + text-lg + font-regular + text-neutral-800 + dark:text-neutral-200; } - .authorsContainer { - @apply flex - items-center; + .authors { + @apply mb-8 + flex + flex-wrap + items-center + gap-4; a { - @apply ml-2 - text-xs - text-neutral-600 - underline - visited:text-neutral-600; + @apply flex + items-center + gap-1 + text-xs + text-neutral-600 + underline + visited:text-neutral-600; + } + + svg { + @apply h-3 + w-3 + text-neutral-600; + } + } + + .wrapper { + @apply flex + flex-col + gap-4; + + h1, + h2, + h3, + h4, + h5, + p { + @apply text-neutral-900 + dark:text-white; } } } diff --git a/components/Downloads/ChangelogModal/index.tsx b/components/Downloads/ChangelogModal/index.tsx index a658e4d39987b..5bfda869aaf91 100644 --- a/components/Downloads/ChangelogModal/index.tsx +++ b/components/Downloads/ChangelogModal/index.tsx @@ -1,4 +1,4 @@ -import { ArrowUpRightIcon } from '@heroicons/react/24/outline'; +import { ArrowUpRightIcon, XMarkIcon } from '@heroicons/react/24/outline'; import * as Dialog from '@radix-ui/react-dialog'; import { useTranslations } from 'next-intl'; import type { FC, PropsWithChildren, ReactNode, ComponentProps } from 'react'; @@ -24,26 +24,28 @@ const ChangelogModal: FC> = ({ children, }) => { const t = useTranslations(); + return ( {trigger} - - - - {heading} - - + + + + + + {heading} + {subheading} -
+
{t('components.downloads.changelogModal.startContributing')} + -
- {children} +
{children}