@@ -799,11 +799,11 @@ const EditorLeaf = ({ attributes, children, leaf }: any) => {
|
|||||||
<span {...attributes}>
|
<span {...attributes}>
|
||||||
<code
|
<code
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: 'rgba(135,131,120,0.15)',
|
backgroundColor: '#F2F5F9',
|
||||||
borderRadius: '3px',
|
borderRadius: '5px',
|
||||||
color: '#EB5757',
|
color: '#3A4C5C',
|
||||||
fontSize: '0.875em',
|
padding: '3px 8px',
|
||||||
padding: '0.25em 0.375em',
|
margin: '0 2px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{customChildren}
|
{customChildren}
|
||||||
|
|||||||
@@ -40,8 +40,9 @@ const todoIsEmpty = (contentValue: ContentColumnValue): boolean => {
|
|||||||
(todoValue.length === 1 && !todoValue[0]['text'])
|
(todoValue.length === 1 && !todoValue[0]['text'])
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const BulletLeft = styled('div')(() => ({
|
const BulletLeft = styled('div')(({ theme }) => ({
|
||||||
height: '22px',
|
height: '22px',
|
||||||
|
color: theme.affine.typography.body1.color,
|
||||||
}));
|
}));
|
||||||
export const BulletView = ({ block, editor }: CreateView) => {
|
export const BulletView = ({ block, editor }: CreateView) => {
|
||||||
// block.remove();
|
// block.remove();
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ import {
|
|||||||
BlockPendantProvider,
|
BlockPendantProvider,
|
||||||
} from '@toeverything/components/editor-core';
|
} from '@toeverything/components/editor-core';
|
||||||
import { copyToClipboard } from '@toeverything/utils';
|
import { copyToClipboard } from '@toeverything/utils';
|
||||||
|
import { DuplicateIcon } from '@toeverything/components/icons';
|
||||||
|
|
||||||
interface CreateCodeView extends CreateView {
|
interface CreateCodeView extends CreateView {
|
||||||
style9?: StyleWithAtRules;
|
style9?: StyleWithAtRules;
|
||||||
containerClassName?: string;
|
containerClassName?: string;
|
||||||
@@ -117,10 +119,21 @@ const CodeBlock = styled('div')(({ theme }) => ({
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
},
|
},
|
||||||
'.copy-block': {
|
'.copy-block': {
|
||||||
padding: '6px 10px',
|
padding: '0px 10px',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
|
height: '32px',
|
||||||
|
display: 'flex',
|
||||||
|
width: '90px',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
color: '#4C6275',
|
||||||
|
fontSize: '14px',
|
||||||
borderRadius: theme.affine.shape.borderRadius,
|
borderRadius: theme.affine.shape.borderRadius,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
|
svg: {
|
||||||
|
marginRight: '4px',
|
||||||
|
display: 'block',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'.cm-focused': {
|
'.cm-focused': {
|
||||||
outline: 'none !important',
|
outline: 'none !important',
|
||||||
@@ -187,7 +200,7 @@ export const CodeView = ({ block, editor }: CreateCodeView) => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div className="copy-block" onClick={copyCode}>
|
<div className="copy-block" onClick={copyCode}>
|
||||||
Copy
|
<DuplicateIcon></DuplicateIcon>Copy
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const List = styled('div')(({ theme }) => ({
|
|||||||
'.checkBoxContainer': {
|
'.checkBoxContainer': {
|
||||||
marginRight: '4px',
|
marginRight: '4px',
|
||||||
lineHeight: theme.affine.typography.body1.lineHeight,
|
lineHeight: theme.affine.typography.body1.lineHeight,
|
||||||
|
color: theme.affine.typography.body1.color,
|
||||||
},
|
},
|
||||||
'.textContainer': {
|
'.textContainer': {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user