budibase/packages/standard-components/src/Text.svelte

28 lines
476 B
Svelte
Raw Normal View History

<script>
2020-02-03 10:50:30 +01:00
import { buildStyle } from "./buildStyle"
2020-02-03 10:50:30 +01:00
export let value = ""
export let containerClass = ""
2020-02-03 10:50:30 +01:00
export let font = ""
export let textAlign = ""
export let verticalAlign = ""
export let color = ""
2020-02-03 10:50:30 +01:00
export let _bb
2020-02-03 10:50:30 +01:00
let style = ""
2020-02-03 10:50:30 +01:00
$: {
style = buildStyle({
font,
verticalAlign,
color,
"text-align": textAlign,
"vertical-align": verticalAlign,
})
}
</script>
2020-02-03 10:50:30 +01:00
<div class={containerClass} {style}>{value}</div>