From 94a3cff12958a96943480fa8020a3b0a86355320 Mon Sep 17 00:00:00 2001 From: Lakshay saini Date: Fri, 15 Dec 2023 15:24:57 +0530 Subject: [PATCH 01/18] feat: add Settings/Accounts/New section with empty state --- .../components/SettingsNewAccountSection.tsx | 15 +++++++++++++++ .../settings/accounts/SettingsNewAccount.tsx | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 packages/twenty-front/src/modules/settings/accounts/components/SettingsNewAccountSection.tsx diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsNewAccountSection.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsNewAccountSection.tsx new file mode 100644 index 000000000000..50277a588b25 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsNewAccountSection.tsx @@ -0,0 +1,15 @@ +import { H2Title } from '@/ui/display/typography/components/H2Title'; +import { Section } from '@/ui/layout/section/components/Section'; +import { SettingsAccountsEmptyStateCard } from './SettingsAccountsEmptyStateCard'; + +export const SettingsNewAccountSection = () => { + return ( +
+ + +
+ ); +}; diff --git a/packages/twenty-front/src/pages/settings/accounts/SettingsNewAccount.tsx b/packages/twenty-front/src/pages/settings/accounts/SettingsNewAccount.tsx index 995ba4c5d0d6..2371127b75d4 100644 --- a/packages/twenty-front/src/pages/settings/accounts/SettingsNewAccount.tsx +++ b/packages/twenty-front/src/pages/settings/accounts/SettingsNewAccount.tsx @@ -1,3 +1,4 @@ +import { SettingsNewAccountSection } from '@/settings/accounts/components/SettingsNewAccountSection'; import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer'; import { IconSettings } from '@/ui/display/icon'; import { SubMenuTopBarContainer } from '@/ui/layout/page/SubMenuTopBarContainer'; @@ -13,6 +14,7 @@ export const SettingsNewAccount = () => { { children: `New` }, ]} /> + ); From c6bba4e23e93180a4b9fe63669232ee89a4bfcb9 Mon Sep 17 00:00:00 2001 From: Lakshay saini Date: Sat, 16 Dec 2023 14:26:10 +0530 Subject: [PATCH 02/18] fix: added label for Empty State Card --- .../components/SettingsAccountsEmptyStateCard.tsx | 10 ++++++++-- .../accounts/components/SettingsNewAccountSection.tsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEmptyStateCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEmptyStateCard.tsx index 25c99fef7419..23fe1e1305c3 100644 --- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEmptyStateCard.tsx +++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEmptyStateCard.tsx @@ -20,7 +20,13 @@ const StyledBody = styled(CardContent)` justify-content: center; `; -export const SettingsAccountsEmptyStateCard = () => { +type SettingsAccountsEmptyStateCardProps = { + label?: string; +}; + +export const SettingsAccountsEmptyStateCard = ({ + label, +}: SettingsAccountsEmptyStateCardProps) => { const [generateTransientToken] = useGenerateTransientTokenMutation(); const handleGmailLogin = useCallback(async () => { @@ -36,7 +42,7 @@ export const SettingsAccountsEmptyStateCard = () => { return ( - No connected account + {label || 'No connected account'}