tiptap: update icon

This commit is contained in:
fantasticit 2022-05-10 16:15:26 +08:00
parent 9f3e766810
commit c70846a8ba
5 changed files with 24 additions and 4 deletions

View File

@ -6,7 +6,7 @@ export const IconDocument: React.FC<{ style?: React.CSSProperties }> = ({ style
<Icon <Icon
style={style} style={style}
svg={ svg={
<svg height="18" width="18" viewBox="0 0 24 24" focusable="false"> <svg height="16" width="16" viewBox="0 0 24 24" focusable="false">
<g fill="currentColor" fillRule="evenodd" clipRule="evenodd"> <g fill="currentColor" fillRule="evenodd" clipRule="evenodd">
<path <path
transform="translate(2 2)" transform="translate(2 2)"

View File

@ -0,0 +1,17 @@
import { Icon } from '@douyinfe/semi-ui';
export const IconTableOfContents: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
return (
<Icon
style={style}
svg={
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="17" height="17">
<path
d="M160 64C107.264 64 64 107.264 64 160v640c0 52.736 43.264 96 96 96h640c52.736 0 96-43.264 96-96v-640c0-52.736-43.264-96-96-96z m0 64h640c17.984 0 32 14.016 32 32v640c0 17.984-14.016 32-32 32h-640a31.616 31.616 0 0 1-32-32v-640c0-17.984 14.016-32 32-32zM256 320v64h448V320z m0 128v64h448V448z m0 128v64h320V576z"
fill="currentColor"
></path>
</svg>
}
/>
);
};

View File

@ -58,3 +58,5 @@ export * from './IconMindRight';
export * from './IconMindSide'; export * from './IconMindSide';
export * from './IconMindFull'; export * from './IconMindFull';
export * from './IconMindCenter'; export * from './IconMindCenter';
export * from './IconTableOfContents';

View File

@ -15,6 +15,7 @@ import {
IconMath, IconMath,
IconCountdown, IconCountdown,
IconCallout, IconCallout,
IconTableOfContents,
} from 'components/icons'; } from 'components/icons';
import { GridSelect } from 'components/grid-select'; import { GridSelect } from 'components/grid-select';
import { useToggle } from 'hooks/use-toggle'; import { useToggle } from 'hooks/use-toggle';
@ -31,7 +32,7 @@ const COMMANDS = [
title: '通用', title: '通用',
}, },
{ {
icon: <IconCodeBlock />, icon: <IconTableOfContents />,
label: '目录', label: '目录',
action: (editor) => editor.chain().focus().setTableOfContents().run(), action: (editor) => editor.chain().focus().setTableOfContents().run(),
}, },

View File

@ -15,11 +15,11 @@ import {
IconImage, IconImage,
IconCodeBlock, IconCodeBlock,
IconStatus, IconStatus,
IconInfo,
IconAttachment, IconAttachment,
IconMath, IconMath,
IconCountdown, IconCountdown,
IconCallout, IconCallout,
IconTableOfContents,
} from 'components/icons'; } from 'components/icons';
import { createCountdown } from './countdown/service'; import { createCountdown } from './countdown/service';
import { createOrToggleLink } from './link/service'; import { createOrToggleLink } from './link/service';
@ -128,7 +128,7 @@ export const QUICK_INSERT_ITEMS = [
key: '目录', key: '目录',
label: ( label: (
<Space> <Space>
<IconTable /> <IconTableOfContents />
</Space> </Space>
), ),