2021-03-25 23:32:23 +01:00
|
|
|
<script lang="typescript">
|
|
|
|
import ButtonBarOuter from "./ButtonBarOuter.svelte";
|
|
|
|
import ButtonBar from "./ButtonBar.svelte";
|
2021-03-29 21:48:31 +02:00
|
|
|
import ButtonGroup from "./ButtonGroup.svelte";
|
2021-03-25 23:32:23 +01:00
|
|
|
|
2021-03-29 14:54:10 +02:00
|
|
|
import LabelButton from "./LabelButton.svelte";
|
|
|
|
import IconButton from "./IconButton.svelte";
|
2021-03-25 23:32:23 +01:00
|
|
|
|
2021-03-29 15:27:42 +02:00
|
|
|
import bracketsIcon from "./code-brackets.svg";
|
|
|
|
|
|
|
|
import paperclipIcon from "./paperclip.svg";
|
|
|
|
import micIcon from "./mic.svg";
|
|
|
|
import threeDotsIcon from "./three-dots.svg";
|
|
|
|
|
2021-03-29 21:05:30 +02:00
|
|
|
import {
|
|
|
|
boldButton,
|
|
|
|
italicButton,
|
|
|
|
underlineButton,
|
|
|
|
superscriptButton,
|
|
|
|
subscriptButton,
|
|
|
|
eraserButton,
|
|
|
|
} from "./format";
|
2021-03-29 17:32:43 +02:00
|
|
|
import { forecolorButton, colorpickerButton } from "./color";
|
|
|
|
|
2021-03-29 14:54:10 +02:00
|
|
|
export let leftButtons = [
|
2021-03-29 21:48:31 +02:00
|
|
|
[
|
|
|
|
{ component: LabelButton, label: "Fields..." },
|
|
|
|
{ component: LabelButton, label: "Cards..." },
|
|
|
|
],
|
2021-03-29 14:54:10 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
export let rightButtons = [
|
2021-03-29 21:48:31 +02:00
|
|
|
[
|
|
|
|
boldButton,
|
|
|
|
italicButton,
|
|
|
|
underlineButton,
|
|
|
|
superscriptButton,
|
|
|
|
subscriptButton,
|
|
|
|
eraserButton,
|
|
|
|
],
|
|
|
|
[forecolorButton, colorpickerButton],
|
|
|
|
[
|
|
|
|
{ component: IconButton, icon: bracketsIcon },
|
|
|
|
{ component: IconButton, icon: paperclipIcon },
|
|
|
|
{ component: IconButton, icon: micIcon },
|
|
|
|
{ component: IconButton, icon: threeDotsIcon },
|
|
|
|
],
|
2021-03-29 14:54:10 +02:00
|
|
|
];
|
2021-03-25 23:32:23 +01:00
|
|
|
export let nightMode: boolean;
|
|
|
|
|
|
|
|
console.log(nightMode);
|
2021-03-25 21:11:40 +01:00
|
|
|
</script>
|
|
|
|
|
2021-03-25 23:32:23 +01:00
|
|
|
<ButtonBarOuter>
|
|
|
|
<ButtonBar>
|
2021-03-29 21:48:31 +02:00
|
|
|
{#each leftButtons as leftGroup}
|
|
|
|
<ButtonGroup>
|
|
|
|
{#each leftGroup as leftButton}
|
|
|
|
<svelte:component this={leftButton.component} {...leftButton} />
|
|
|
|
{/each}
|
|
|
|
</ButtonGroup>
|
2021-03-25 23:32:23 +01:00
|
|
|
{/each}
|
|
|
|
</ButtonBar>
|
2021-03-25 21:11:40 +01:00
|
|
|
|
2021-03-25 23:32:23 +01:00
|
|
|
<ButtonBar>
|
2021-03-29 21:48:31 +02:00
|
|
|
{#each rightButtons as rightGroup}
|
|
|
|
<ButtonGroup>
|
|
|
|
{#each rightGroup as rightButton}
|
|
|
|
<svelte:component this={rightButton.component} {...rightButton} />
|
|
|
|
{/each}
|
|
|
|
</ButtonGroup>
|
2021-03-25 23:32:23 +01:00
|
|
|
{/each}
|
|
|
|
</ButtonBar>
|
|
|
|
</ButtonBarOuter>
|