Browse Source

chore: options in board

ascarbek 2 years ago
parent
commit
d1d667c497

+ 7 - 0
frontend/appflowy_tauri/src/appflowy_app/components/_shared/svg/ArrowLeftSvg.tsx

@@ -0,0 +1,7 @@
+export const ArrowLeftSvg = () => {
+  return (
+    <svg width='100%' height='100%' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
+      <path d='M10 4L6 8L10 12' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+    </svg>
+  );
+};

+ 7 - 0
frontend/appflowy_tauri/src/appflowy_app/components/_shared/svg/ArrowRightSvg.tsx

@@ -0,0 +1,7 @@
+export const ArrowRightSvg = () => {
+  return (
+    <svg width='100%' height='100%' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
+      <path d='M6 4L10 8L6 12' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+    </svg>
+  );
+};

+ 9 - 0
frontend/appflowy_tauri/src/appflowy_app/components/_shared/svg/SkipLeftSvg.tsx

@@ -0,0 +1,9 @@
+export const SkipLeftSvg = () => {
+  return (
+    <svg width='100%' height='100%' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
+      <path d='M3 11.7778L3 4' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+      <path d='M9.5 4.5L6 8L9.5 11.5' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+      <path d='M6 8L13 8' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+    </svg>
+  );
+};

+ 9 - 0
frontend/appflowy_tauri/src/appflowy_app/components/_shared/svg/SkipRightSvg.tsx

@@ -0,0 +1,9 @@
+export const SkipRightSvg = () => {
+  return (
+    <svg width='100%' height='100%' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
+      <path d='M13 11.7778L13 4' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+      <path d='M6.5 4.5L10 8L6.5 11.5' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+      <path d='M10 8L3 8' stroke='currentColor' strokeLinecap='round' strokeLinejoin='round' />
+    </svg>
+  );
+};

+ 7 - 3
frontend/appflowy_tauri/src/appflowy_app/components/board/BoardOptionsCell.tsx

@@ -3,6 +3,7 @@ import { useCell } from '../_shared/database-hooks/useCell';
 import { CellIdentifier } from '../../stores/effects/database/cell/cell_bd_svc';
 import { CellCache } from '../../stores/effects/database/cell/cell_cache';
 import { FieldController } from '../../stores/effects/database/field/field_controller';
+import { getBgColor } from '$app/components/_shared/getColor';
 
 export const BoardOptionsCell = ({
   cellIdentifier,
@@ -16,10 +17,13 @@ export const BoardOptionsCell = ({
   const { data } = useCell(cellIdentifier, cellCache, fieldController);
 
   return (
-    <>
+    <div className={'flex flex-wrap items-center gap-2 py-2 text-xs text-black'}>
       {(data as SelectOptionCellDataPB | undefined)?.select_options?.map((option, index) => (
-        <div key={index}>{option?.name || ''}</div>
+        <div className={`${getBgColor(option.color)} rounded px-2 py-0.5`} key={index}>
+          {option?.name || ''}
+        </div>
       )) || ''}
-    </>
+      &nbsp;
+    </div>
   );
 };