From dbc2db21fd5106d6bd31a0e8d5f091a22641977d Mon Sep 17 00:00:00 2001 From: Thierry Date: Mon, 4 Nov 2024 20:08:50 -0500 Subject: [PATCH 1/9] snackbar design system + remove index of theme folder --- App.tsx | 2 + .../NewAccount/NewAccountScreenComp.tsx | 6 +- .../ConnectViaWallet/ConnectViaWallet.tsx | 5 +- .../Onboarding/OnboardingScreenComp.tsx | 6 +- components/Screen/ScreenComp/Screen.tsx | 8 +- components/Snackbar/Snackbar.constants.ts | 15 ++ components/Snackbar/Snackbar.example.tsx | 99 +++++++ components/Snackbar/Snackbar.service.ts | 69 +++++ components/Snackbar/Snackbar.store.ts | 23 ++ components/Snackbar/Snackbar.tsx | 254 ++++++++++++++++++ components/Snackbar/Snackbar.types.ts | 10 + .../SnackbarBackdrop.android.tsx | 41 +++ .../SnackbarBackdrop/SnackbarBackdrop.tsx | 71 +++++ .../SnackbarBackdrop.utils.ts | 29 ++ components/Snackbar/Snackbars.tsx | 33 +++ design-system/Button/Button.props.ts | 2 +- design-system/Button/Button.styles.ts | 27 +- design-system/Text/Text.props.ts | 5 +- design-system/Text/Text.styles.ts | 2 +- design-system/Text/Text.tsx | 7 +- design-system/Text/Text.utils.ts | 13 +- hooks/usePressInOut.tsx | 14 +- ios/Podfile.lock | 20 +- package.json | 4 + .../NewAccount/NewAccountPrivateKeyScreen.tsx | 8 +- screens/NewAccount/NewAccountScreen.tsx | 7 +- .../NewAccountUserProfileScreen.tsx | 6 +- .../OnboardingNotificationsScreen.tsx | 6 +- .../OnboardingUserProfileScreen.tsx | 8 +- screens/ShareProfile.tsx | 6 +- theme/index.ts | 4 - theme/shadow.ts | 15 ++ theme/useAppTheme.ts | 21 ++ yarn.lock | 15 ++ 34 files changed, 801 insertions(+), 60 deletions(-) create mode 100644 components/Snackbar/Snackbar.constants.ts create mode 100644 components/Snackbar/Snackbar.example.tsx create mode 100644 components/Snackbar/Snackbar.service.ts create mode 100644 components/Snackbar/Snackbar.store.ts create mode 100644 components/Snackbar/Snackbar.tsx create mode 100644 components/Snackbar/Snackbar.types.ts create mode 100644 components/Snackbar/SnackbarBackdrop/SnackbarBackdrop.android.tsx create mode 100644 components/Snackbar/SnackbarBackdrop/SnackbarBackdrop.tsx create mode 100644 components/Snackbar/SnackbarBackdrop/SnackbarBackdrop.utils.ts create mode 100644 components/Snackbar/Snackbars.tsx delete mode 100644 theme/index.ts create mode 100644 theme/shadow.ts diff --git a/App.tsx b/App.tsx index 11fdee059..35fb40473 100644 --- a/App.tsx +++ b/App.tsx @@ -47,6 +47,7 @@ import { registerBackgroundFetchTask } from "./utils/background"; import { privySecureStorage } from "./utils/keychain/helpers"; import { initSentry } from "./utils/sentry"; import "./utils/splash/splash"; +import { Snackbars } from "@components/Snackbar/Snackbars"; LogBox.ignoreLogs([ "Privy: Expected status code 200, received 400", // Privy @@ -161,6 +162,7 @@ export default function AppWithProviders() { + diff --git a/components/NewAccount/NewAccountScreenComp.tsx b/components/NewAccount/NewAccountScreenComp.tsx index a20551d59..f2f9b3ee3 100644 --- a/components/NewAccount/NewAccountScreenComp.tsx +++ b/components/NewAccount/NewAccountScreenComp.tsx @@ -1,11 +1,11 @@ +import { useAppTheme } from "@theme/useAppTheme"; import { memo } from "react"; - -import { spacing } from "../../theme"; import { Screen } from "../Screen/ScreenComp/Screen"; import { IScreenProps } from "../Screen/ScreenComp/Screen.props"; export const NewAccountScreenComp = memo(function (props: IScreenProps) { const { contentContainerStyle, ...restProps } = props; + const { theme } = useAppTheme(); return ( }