From e467481b75ce22f3aba9bf43eda1495bbaadfe18 Mon Sep 17 00:00:00 2001 From: ascarbek Date: Fri, 7 Apr 2023 16:52:34 +0600 Subject: [PATCH] chore: group popup --- .../components/TestColors/TestColors.tsx | 78 +++++++++---------- .../components/board/BoardFieldsPopup.tsx | 3 +- .../board/BoardGroupFieldsPopup.tsx | 35 ++++++++- .../components/board/BoardSettingsPopup.tsx | 2 +- 4 files changed, 75 insertions(+), 43 deletions(-) diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/TestColors/TestColors.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/TestColors/TestColors.tsx index 2a46fb4acb..a9b6e3ada5 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/TestColors/TestColors.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/TestColors/TestColors.tsx @@ -45,121 +45,121 @@ export const TestColors = () => {

Icons

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardFieldsPopup.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardFieldsPopup.tsx index 9b8a765bbd..3f894c03aa 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardFieldsPopup.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardFieldsPopup.tsx @@ -1,6 +1,5 @@ import { useAppSelector } from '$app/stores/store'; import { FieldTypeIcon } from '$app/components/_shared/EditRow/FieldTypeIcon'; -import { Popup } from '$app/components/_shared/Popup'; import { useRef } from 'react'; import useOutsideClick from '$app/components/_shared/useOutsideClick'; import { EyeOpenSvg } from '$app/components/_shared/svg/EyeOpenSvg'; @@ -12,7 +11,7 @@ export const BoardFieldsPopup = ({ hidePopup }: { hidePopup: () => void }) => { useOutsideClick(ref, () => hidePopup()); return ( -
+
{columns.map((column, index) => (
void }) => { - return <>; + const columns = useAppSelector((state) => state.database.columns); + const fields = useAppSelector((state) => state.database.fields); + const ref = useRef(null); + useOutsideClick(ref, () => hidePopup()); + + return ( +
+ {columns.map((column, index) => ( +
+
+ + + + {fields[column.fieldId].title} +
+
+ + + +
+
+ ))} +
+ ); }; diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardSettingsPopup.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardSettingsPopup.tsx index 3e37ed27c4..96126964a4 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardSettingsPopup.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/board/BoardSettingsPopup.tsx @@ -42,7 +42,7 @@ export const BoardSettingsPopup = ({ hidePopup()} items={settingsItems} - className={'absolute top-full left-full z-10'} + className={'absolute top-full left-full z-10 text-xs'} > ); };