import { createSignal, Show, For } from 'solid-js' import type { Editor } from '@tiptap/core' import styles from './FigureBubbleMenu.module.scss' import { clsx } from 'clsx' import { Icon } from '../../_shared/Icon' import { useLocalize } from '../../../context/localize' type Props = { editor: Editor ref: (el: HTMLElement) => void } const backgrounds = [null, 'white', 'black', 'yellow', 'pink', 'green'] export const IncutBubbleMenu = (props: Props) => { const { t } = useLocalize() const [substratBubbleOpen, setSubstratBubbleOpen] = createSignal(false) return (
{(bg) => (
props.editor.chain().focus().setArticleBg(bg).run()} class={clsx(styles.color, styles[bg])} /> )}
) }