From 49e77f21e02e1116af2343380f636fc6cd990e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cosmin=20P=C3=A2rvulescu?= Date: Thu, 1 Jun 2023 17:50:08 +0300 Subject: [PATCH] Added dark mode to popover --- .../app/routes/authenticate/$clientId.tsx | 16 +++--- apps/passport/app/routes/authorize.tsx | 14 ++--- .../src/atoms/popover/Popover.tsx | 53 +++++++++++-------- 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/apps/passport/app/routes/authenticate/$clientId.tsx b/apps/passport/app/routes/authenticate/$clientId.tsx index 6e0d2aaf1d..b4ba00bd9f 100644 --- a/apps/passport/app/routes/authenticate/$clientId.tsx +++ b/apps/passport/app/routes/authenticate/$clientId.tsx @@ -12,6 +12,7 @@ import { Helmet } from 'react-helmet' import { getRGBColor } from '@proofzero/design-system/src/helpers' import { useEffect, useState } from 'react' import { getRollupReqFunctionErrorWrapper } from '@proofzero/utils/errors' +import { AuthenticationScreenDefaults } from '@proofzero/design-system/src/templates/authentication/Authentication' export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper( async ({ request, context, params }) => { @@ -68,20 +69,21 @@ export default () => { return ( <> - {appProps.appTheme?.color && ( - - - - )} + +
- {appProfile.appTheme?.color && ( - - - - )} +
, - React.ComponentPropsWithoutRef ->(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => { + const { dark } = useContext(ThemeContext) + + return ( +
+
-)) + ) +}) PopoverContent.displayName = PopoverPrimitive.Content.displayName const PopoverExample = () => { - return - Open - Place content for the popover here. + return ( + + Open + Place content for the popover here. + ) } - -export { Popover, PopoverTrigger, PopoverContent, PopoverExample } \ No newline at end of file +export { Popover, PopoverTrigger, PopoverContent, PopoverExample }