From 0e858d87d41b3b43fd79d5137b27dcbb000e66a8 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Wed, 23 Jun 2021 17:35:50 +0200 Subject: [PATCH] Add Tag.svelte --- ts/editor/BUILD.bazel | 3 +++ ts/editor/Tag.svelte | 30 ++++++++++++++++++++++++++++++ ts/editor/TagEditor.svelte | 5 ++++- ts/editor/icons.ts | 2 ++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ts/editor/Tag.svelte diff --git a/ts/editor/BUILD.bazel b/ts/editor/BUILD.bazel index 470777076..206c7bdd9 100644 --- a/ts/editor/BUILD.bazel +++ b/ts/editor/BUILD.bazel @@ -103,6 +103,9 @@ copy_bootstrap_icons( "text-center.svg", "text-indent-left.svg", "text-indent-right.svg", + + # tag editor + "x.svg", ], visibility = ["//visibility:public"], ) diff --git a/ts/editor/Tag.svelte b/ts/editor/Tag.svelte new file mode 100644 index 000000000..698eca901 --- /dev/null +++ b/ts/editor/Tag.svelte @@ -0,0 +1,30 @@ + + + +{#if active} + active! +{:else} + + + {@html deleteIcon} + +{/if} + + diff --git a/ts/editor/TagEditor.svelte b/ts/editor/TagEditor.svelte index 6c97a51e3..f44b65f61 100644 --- a/ts/editor/TagEditor.svelte +++ b/ts/editor/TagEditor.svelte @@ -4,8 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> - Tags + Tags: + en::foobar + zh::ใ‚ใกใ“ diff --git a/ts/editor/icons.ts b/ts/editor/icons.ts index 00ae6776c..bce7f0f67 100644 --- a/ts/editor/icons.ts +++ b/ts/editor/icons.ts @@ -31,6 +31,8 @@ export { default as ellipseIcon } from "./contain.svg"; export { default as functionIcon } from "./function-variant.svg"; export { default as xmlIcon } from "./xml.svg"; +export { default as deleteIcon } from "./x.svg"; + export const arrowIcon = '';