1
0
Fork 0
mirror of synced 2024-08-21 21:11:23 +12:00
budibase/packages/standard-components/src/Text.svelte

40 lines
602 B
Svelte
Raw Normal View History

<script>
import { getContext } from "svelte"
const { styleable } = getContext("sdk")
const component = getContext("component")
export let text = ""
export let bold = false
export let italic = false
export let underline = false
let element
</script>
<p
bind:this={element}
use:styleable={$component.styles}
class:bold
class:italic
class:underline
>
{text}
</p>
<style>
2021-02-23 23:04:07 +13:00
p {
display: inline-block;
2021-02-23 23:04:07 +13:00
white-space: pre-wrap;
}
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
.underline {
text-decoration: underline;
}
</style>