2019-09-19 15:35:40 +12:00
|
|
|
<script>
|
2020-02-03 22:50:30 +13:00
|
|
|
import { buildStyle } from "./buildStyle"
|
2019-09-19 15:35:40 +12:00
|
|
|
|
2020-02-15 00:51:45 +13:00
|
|
|
export let text = ""
|
|
|
|
export let className = ""
|
|
|
|
|
2020-05-20 04:00:53 +12:00
|
|
|
export let type = ""
|
2019-09-19 15:35:40 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
export let _bb
|
2019-09-19 15:35:40 +12:00
|
|
|
|
2020-05-20 04:00:53 +12:00
|
|
|
const isTag = tag => type === tag
|
2019-09-19 15:35:40 +12:00
|
|
|
</script>
|
|
|
|
|
2020-02-26 04:21:23 +13:00
|
|
|
{#if isTag('none')}
|
2020-05-20 04:00:53 +12: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-15 01:21:43 +13:00
|
|
|
{:else}<span>{text}</span>{/if}
|