diff --git a/public/icons/editor-image-add.svg b/public/icons/editor-image-add.svg new file mode 100644 index 00000000..2f0b11fd --- /dev/null +++ b/public/icons/editor-image-add.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/editor-image-align-center.svg b/public/icons/editor-image-align-center.svg new file mode 100644 index 00000000..52ff856e --- /dev/null +++ b/public/icons/editor-image-align-center.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/editor-image-align-left.svg b/public/icons/editor-image-align-left.svg new file mode 100644 index 00000000..f5c0e52a --- /dev/null +++ b/public/icons/editor-image-align-left.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/editor-image-align-right.svg b/public/icons/editor-image-align-right.svg new file mode 100644 index 00000000..137db907 --- /dev/null +++ b/public/icons/editor-image-align-right.svg @@ -0,0 +1,3 @@ + diff --git a/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.module.scss b/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.module.scss index 12eb9215..1f32a873 100644 --- a/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.module.scss +++ b/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.module.scss @@ -1,6 +1,8 @@ -.bubbleMenu { - background: #fff; - box-shadow: 0 4px 10px rgba(#000, 0.25); +.ImageBubbleMenu { + background: #000; + display: flex; + flex-direction: row; + align-items: center; .bubbleMenuButton { display: inline-flex; @@ -10,16 +12,8 @@ opacity: 0.5; padding: 1rem; - .triangle { - margin-left: 4px; - } - - .colorWheel { - display: inline-block; - width: 20px; - height: 20px; - border-radius: 50%; - background: #f6e3a1; + img { + display: block; } } @@ -28,58 +22,12 @@ } .delimiter { - background: #999; + background: #fff; + opacity: 0.5; display: inline-block; height: 1.4em; margin: 0 0.2em; vertical-align: text-bottom; width: 1px; } - - .dropDownHolder { - position: relative; - cursor: pointer; - display: inline-flex; - flex-flow: row nowrap; - align-items: center; - - .dropDown { - position: absolute; - padding: 6px; - top: calc(100% + 8px); - left: 50%; - transform: translateX(-50%); - box-shadow: 0 4px 10px rgb(0 0 0 / 25%); - background: #fff; - color: #898c94; - - & > header { - font-size: 10px; - border-bottom: 1px solid #898c94; - } - - .actions { - display: flex; - align-items: center; - justify-content: flex-start; - gap: 12px; - flex-wrap: nowrap; - margin-bottom: 8px; - - &:last-child { - margin-bottom: 0; - } - - .bubbleMenuButton { - min-width: 40px; - } - } - } - } - - .dropDownEnter, - .dropDownExit { - height: 0; - color: transparent; - } } diff --git a/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.tsx b/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.tsx index dc29029f..92b57012 100644 --- a/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.tsx +++ b/src/components/Editor/ImageBubbleMenu/ImageBubbleMenu.tsx @@ -1,5 +1,7 @@ import type { Editor } from '@tiptap/core' import styles from './ImageBubbleMenu.module.scss' +import { clsx } from 'clsx' +import { Icon } from '../../_shared/Icon' type BubbleMenuProps = { editor: Editor @@ -8,8 +10,20 @@ type BubbleMenuProps = { export const ImageBubbleMenu = (props: BubbleMenuProps) => { return ( -