diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellOptionPopup.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellOptionPopup.tsx
index b7a7e9f0e6..62f809cf80 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellOptionPopup.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellOptionPopup.tsx
@@ -105,134 +105,91 @@ export const EditCellOptionPopup = ({
{t('grid.selectOption.colorPanelTitle')}
-
onColorClick(SelectOptionColorPB.Purple)}
- >
-
-
-
{t('grid.selectOption.purpleColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Purple && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Pink)}
- >
-
-
-
{t('grid.selectOption.pinkColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Pink && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.LightPink)}
- >
-
-
-
{t('grid.selectOption.lightPinkColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.LightPink && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Orange)}
- >
-
-
-
{t('grid.selectOption.orangeColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Orange && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Yellow)}
- >
-
-
-
{t('grid.selectOption.yellowColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Yellow && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Lime)}
- >
-
-
-
{t('grid.selectOption.limeColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Lime && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Green)}
- >
-
-
-
{t('grid.selectOption.greenColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Green && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Aqua)}
- >
-
-
-
{t('grid.selectOption.aquaColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Aqua && (
-
-
-
- )}
-
-
+
onColorClick(SelectOptionColorPB.Blue)}
- >
-
-
-
{t('grid.selectOption.blueColor')}
-
- {editingSelectOption.color === SelectOptionColorPB.Blue && (
-
-
-
- )}
-
+ bgColor={getBgColor(SelectOptionColorPB.Blue)}
+ checked={editingSelectOption.color === SelectOptionColorPB.Blue}
+ >
);
};
+
+const ColorItem = ({
+ title,
+ bgColor,
+ onClick,
+ checked,
+}: {
+ title: string;
+ bgColor: string;
+ onClick: () => void;
+ checked: boolean;
+}) => {
+ return (
+ onClick()}
+ >
+
+ {checked && (
+
+
+
+ )}
+
+ );
+};