Use Components.svelte instead of exporting from EditorToolbar.svelte

This commit is contained in:
Henrik Giesel 2021-07-05 16:19:03 +02:00
parent 581c3e2486
commit 59c5ecd4fc
3 changed files with 24 additions and 5 deletions

View File

@ -0,0 +1,22 @@
<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script context="module" lang="typescript">
import IconButton from "components/IconButton.svelte";
import LabelButton from "components/LabelButton.svelte";
import WithShortcut from "components/WithShortcut.svelte";
import WithContext from "components/WithContext.svelte";
import WithState from "components/WithState.svelte";
import * as contextKeys from "components/context-keys";
export const components = {
IconButton,
LabelButton,
WithShortcut,
WithContext,
WithState,
contextKeys,
};
</script>

View File

@ -15,17 +15,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
resetAllState(false);
}
/* Export components */
/* Our dynamic components */
import AddonButtons from "./AddonButtons.svelte";
import PreviewButton from "./PreviewButton.svelte";
import LabelButton from "components/LabelButton.svelte";
import IconButton from "components/IconButton.svelte";
export const editorToolbar = {
AddonButtons,
PreviewButton,
LabelButton,
IconButton,
};
</script>

View File

@ -26,6 +26,7 @@ export { setNoteId, getNoteId } from "./note-id";
export { saveNow } from "./change-timer";
export { wrap, wrapIntoText } from "./wrap";
export { editorToolbar } from "./toolbar";
export { components } from "./Components.svelte";
declare global {
interface Selection {