2019-09-19 05:35:40 +02:00
|
|
|
<script>
|
2020-11-18 20:18:18 +01:00
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
2020-11-20 10:50:10 +01:00
|
|
|
const { styleable } = getContext("sdk")
|
2020-11-24 12:02:10 +01:00
|
|
|
const component = getContext("component")
|
2020-11-17 15:06:43 +01:00
|
|
|
|
2020-02-14 12:51:45 +01:00
|
|
|
export let text = ""
|
2021-06-08 09:00:54 +02:00
|
|
|
export let bold = false
|
|
|
|
export let italic = false
|
|
|
|
export let underline = false
|
|
|
|
|
|
|
|
let element
|
2019-09-19 05:35:40 +02:00
|
|
|
</script>
|
|
|
|
|
2021-06-08 09:00:54 +02:00
|
|
|
<p
|
|
|
|
bind:this={element}
|
|
|
|
use:styleable={$component.styles}
|
|
|
|
class:bold
|
|
|
|
class:italic
|
|
|
|
class:underline
|
|
|
|
>
|
|
|
|
{text}
|
|
|
|
</p>
|
2020-10-16 09:34:17 +02:00
|
|
|
|
|
|
|
<style>
|
2021-02-23 11:04:07 +01:00
|
|
|
p {
|
2020-10-16 09:34:17 +02:00
|
|
|
display: inline-block;
|
2021-02-23 11:04:07 +01:00
|
|
|
white-space: pre-wrap;
|
2020-10-16 09:34:17 +02:00
|
|
|
}
|
2021-06-08 09:00:54 +02:00
|
|
|
.bold {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
.italic {
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
.underline {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
2020-10-16 09:34:17 +02:00
|
|
|
</style>
|