import { useEditor } from "@/modules/editor";
import { defineComponent } from "vue";
import { string } from "vue-types";
import View from "./View";

export default defineComponent({
  props: {
    value: string(),
  },
  setup(props) {
    const { store } = useEditor();
    return () => (
      <View>
        <div contenteditable={store.editMode === "edit"}>{props.value}</div>
      </View>
    );
  },
});
