Browse Source

fix: Improved rich checkbox style and expand btn style

pull/7046/head
Muhammed Mustafa 1 year ago
parent
commit
d3b0e1462b
  1. 23
      packages/nc-gui/components/cell/RichText.vue
  2. 29
      packages/nc-gui/components/cell/TextArea.vue

23
packages/nc-gui/components/cell/RichText.vue

@ -172,6 +172,9 @@ const focusEditorEnd = () => {
}
.nc-textarea-rich {
.ProseMirror {
@apply pt-1;
}
.ProseMirror-focused {
// remove all border
outline: none;
@ -195,11 +198,27 @@ const focusEditorEnd = () => {
}
}
ul,
ol {
@apply !my-0;
}
ul[data-type='taskList'] {
@apply ml-0;
@apply ml-1;
li {
@apply flex flex-row items-baseline gap-x-2;
@apply flex flex-row gap-x-2;
list-style-type: none;
input {
@apply mt-0.75 flex rounded-sm;
z-index: -10;
}
// Unchecked
input:not(:checked) {
// Add border to checkbox
border-width: 1.5px;
@apply border-gray-700;
}
}
}

29
packages/nc-gui/components/cell/TextArea.vue

@ -155,22 +155,24 @@ watch(editEnabled, () => {
<span v-else>{{ vModel }}</span>
<div
<NcTooltip
v-if="active && !isExpandedFormOpen"
class="!absolute right-0 bottom-0 h-6 w-5 group cursor-pointer flex justify-end gap-1 items-center active:(ring ring-accent ring-opacity-100) rounded border-none p-1 hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)"
placement="bottom"
class="!absolute right-0 bottom-1"
:class="{ 'right-2 bottom-2': editEnabled }"
data-testid="attachment-cell-file-picker-button"
@click.stop="isVisible = !isVisible"
>
<NcTooltip placement="bottom">
<template #title>{{ $t('title.expand') }}</template>
<component
:is="iconMap.expand"
class="transform dark:(!text-white) group-hover:(!text-grey-800 ) scale-120 text-gray-700 text-xs"
/>
</NcTooltip>
</div>
<template #title>{{ $t('title.expand') }}</template>
<NcButton
type="secondary"
size="xsmall"
data-testid="attachment-cell-file-picker-button"
@click.stop="isVisible = !isVisible"
>
<component :is="iconMap.expand" class="transform group-hover:(!text-grey-800 ) scale-120 text-gray-700 text-xs" />
</NcButton>
</NcTooltip>
</div>
<template #overlay>
<div ref="inputWrapperRef" class="flex flex-col min-w-200 min-h-70 py-3 pl-3 pr-1 expanded-cell-input relative">
<div
@ -198,8 +200,7 @@ watch(editEnabled, () => {
/>
<LazyCellRichText
v-else
:key="String(isVisible)"
v-else-if="isVisible"
v-model:value="vModel"
class="ml-2 mt-2 nc-scrollbar-md"
:style="{

Loading…
Cancel
Save