diff --git a/public/icons/editor-bold.svg b/public/icons/editor-bold.svg new file mode 100644 index 00000000..aa465b4f --- /dev/null +++ b/public/icons/editor-bold.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/icons/editor-footnote.svg b/public/icons/editor-footnote.svg new file mode 100644 index 00000000..13efe4d8 --- /dev/null +++ b/public/icons/editor-footnote.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/icons/editor-link.svg b/public/icons/editor-link.svg index c4943bd3..804689f3 100644 --- a/public/icons/editor-link.svg +++ b/public/icons/editor-link.svg @@ -1,3 +1,3 @@ - - + + diff --git a/public/icons/editor-plus.svg b/public/icons/editor-plus.svg new file mode 100644 index 00000000..67faf3cc --- /dev/null +++ b/public/icons/editor-plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/icons/editor-text-size.svg b/public/icons/editor-text-size.svg new file mode 100644 index 00000000..f18431a4 --- /dev/null +++ b/public/icons/editor-text-size.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/icons/editor-ul.svg b/public/icons/editor-ul.svg new file mode 100644 index 00000000..a23aad81 --- /dev/null +++ b/public/icons/editor-ul.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Editor/EditorBubbleMenu.module.scss b/src/components/Editor/EditorBubbleMenu.module.scss index e69de29b..97d246c2 100644 --- a/src/components/Editor/EditorBubbleMenu.module.scss +++ b/src/components/Editor/EditorBubbleMenu.module.scss @@ -0,0 +1,22 @@ +.bubbleMenu { + background: #fff; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); +} + +.bubbleMenuButton { + opacity: 0.5; + padding: 1rem; +} + +.bubbleMenuButtonActive { + opacity: 1; +} + +.delimiter { + background: #999; + display: inline-block; + height: 1.4em; + margin: 0 0.2em; + vertical-align: text-bottom; + width: 1px; +} diff --git a/src/components/Editor/EditorBubbleMenu.tsx b/src/components/Editor/EditorBubbleMenu.tsx index e94cb659..043f8aac 100644 --- a/src/components/Editor/EditorBubbleMenu.tsx +++ b/src/components/Editor/EditorBubbleMenu.tsx @@ -1,4 +1,7 @@ import type { Editor } from '@tiptap/core' +import styles from './EditorBubbleMenu.module.scss' +import { Icon } from '../_shared/Icon' +import { clsx } from 'clsx' type BubbleMenuProps = { editor: Editor @@ -7,8 +10,27 @@ type BubbleMenuProps = { export const EditorBubbleMenu = (props: BubbleMenuProps) => { return ( - - bold + + + + + + + + + + + + + + + + + + + + + ) } diff --git a/src/components/Editor/EditorFloatingMenu.module.scss b/src/components/Editor/EditorFloatingMenu.module.scss index e10d9ca3..e6fd6cee 100644 --- a/src/components/Editor/EditorFloatingMenu.module.scss +++ b/src/components/Editor/EditorFloatingMenu.module.scss @@ -1,4 +1,10 @@ .editorFloatingMenu { + left: 0; position: relative; - left: -100%; + vertical-align: middle; + + button { + opacity: 0.3; + vertical-align: text-bottom; + } } diff --git a/src/components/Editor/EditorFloatingMenu.tsx b/src/components/Editor/EditorFloatingMenu.tsx index 1a9ed129..16eda00c 100644 --- a/src/components/Editor/EditorFloatingMenu.tsx +++ b/src/components/Editor/EditorFloatingMenu.tsx @@ -1,5 +1,6 @@ import type { Editor } from '@tiptap/core' import styles from './EditorFloatingMenu.module.scss' +import { Icon } from '../_shared/Icon' type FloatingMenuProps = { editor: Editor @@ -9,7 +10,9 @@ type FloatingMenuProps = { export const EditorFloatingMenu = (props: FloatingMenuProps) => { return ( - + + + + ) }