fix: add pen background
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
import type { KanbanCard } from '@toeverything/components/editor-core';
|
import {
|
||||||
import { RenderBlock, useKanban } from '@toeverything/components/editor-core';
|
KanbanCard,
|
||||||
|
RenderBlock,
|
||||||
|
useEditor,
|
||||||
|
useKanban,
|
||||||
|
} from '@toeverything/components/editor-core';
|
||||||
import { PenIcon } from '@toeverything/components/icons';
|
import { PenIcon } from '@toeverything/components/icons';
|
||||||
import {
|
import {
|
||||||
IconButton,
|
IconButton,
|
||||||
@@ -89,6 +93,7 @@ export const CardItem = ({
|
|||||||
const { openSubPage } = useRefPage();
|
const { openSubPage } = useRefPage();
|
||||||
const [editable, setEditable] = useState(false);
|
const [editable, setEditable] = useState(false);
|
||||||
const showKanbanRefPageFlag = useFlag('ShowKanbanRefPage', false);
|
const showKanbanRefPageFlag = useFlag('ShowKanbanRefPage', false);
|
||||||
|
const { editor } = useEditor();
|
||||||
|
|
||||||
const onAddItem = async () => {
|
const onAddItem = async () => {
|
||||||
setEditable(true);
|
setEditable(true);
|
||||||
@@ -108,9 +113,13 @@ export const CardItem = ({
|
|||||||
{!editable && (
|
{!editable && (
|
||||||
<Overlay onClick={onClickCard}>
|
<Overlay onClick={onClickCard}>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
backgroundColor="#fff"
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setEditable(true);
|
setEditable(true);
|
||||||
|
editor.selectionManager.activeNodeByNodeId(
|
||||||
|
block.id
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PenIcon />
|
<PenIcon />
|
||||||
|
|||||||
Reference in New Issue
Block a user