2019-09-19 05:35:40 +02:00
|
|
|
<script>
|
2020-02-14 12:51:45 +01:00
|
|
|
export let text = ""
|
|
|
|
export let className = ""
|
2020-05-19 18:00:53 +02:00
|
|
|
export let type = ""
|
2020-02-03 10:50:30 +01:00
|
|
|
export let _bb
|
2019-09-19 05:35:40 +02:00
|
|
|
|
2020-05-19 18:00:53 +02:00
|
|
|
const isTag = tag => type === tag
|
2019-09-19 05:35:40 +02:00
|
|
|
</script>
|
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
{#if isTag('none')}
|
2020-05-19 18:00:53 +02:00
|
|
|
<span>{text}</span>
|
|
|
|
{:else if isTag('bold')}
|
|
|
|
<b class={className}>{text}</b>
|
|
|
|
{:else if isTag('strong')}
|
|
|
|
<strong class={className}>{text}</strong>
|
|
|
|
{:else if isTag('italic')}
|
|
|
|
<i class={className}>{text}</i>
|
|
|
|
{:else if isTag('emphasis')}
|
|
|
|
<em class={className}>{text}</em>
|
|
|
|
{:else if isTag('mark')}
|
|
|
|
<mark class={className}>{text}</mark>
|
|
|
|
{:else if isTag('small')}
|
|
|
|
<small class={className}>{text}</small>
|
|
|
|
{:else if isTag('del')}
|
|
|
|
<del class={className}>{text}</del>
|
|
|
|
{:else if isTag('ins')}
|
|
|
|
<ins class={className}>{text}</ins>
|
|
|
|
{:else if isTag('sub')}
|
|
|
|
<sub class={className}>{text}</sub>
|
|
|
|
{:else if isTag('sup')}
|
|
|
|
<sup class={className}>{text}</sup>
|
2020-10-14 14:21:43 +02:00
|
|
|
{:else}<span>{text}</span>{/if}
|
2020-10-16 09:34:17 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
span {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
</style>
|