diff --git a/packages/nc-gui/components/general/ColorPicker.vue b/packages/nc-gui/components/general/ColorPicker.vue index 3ff39967a4..04013f0323 100644 --- a/packages/nc-gui/components/general/ColorPicker.vue +++ b/packages/nc-gui/components/general/ColorPicker.vue @@ -7,6 +7,8 @@ interface Props { rowSize?: number advanced?: boolean pickButton?: boolean + borders?: string[] + isNewDesign?: boolean } const props = withDefaults(defineProps(), { @@ -15,6 +17,7 @@ const props = withDefaults(defineProps(), { rowSize: 10, advanced: true, pickButton: false, + isNewDesign: false, }) const emit = defineEmits(['input', 'closeModal']) @@ -52,11 +55,14 @@ watch(picked, (n, _o) => { v-for="(color, i) of colors.slice((colId - 1) * rowSize, colId * rowSize)" :key="`color-${colId}-${i}`" class="color-selector" - :class="compare(picked, color) ? 'selected' : ''" - :style="{ 'background-color': `${color}` }" + :class="{ 'selected': compare(picked, color), 'new-design': isNewDesign }" + :style="{ + 'background-color': `${color}`, + 'border': borders?.length && borders[i] ? `1px solid ${borders[i]}` : undefined, + }" @click="selectColor(color, true)" > - {{ compare(picked, color) ? '✓' : '' }} + {{ compare(picked, color) && !isNewDesign ? '✓' : '' }}