Updating text align style to be optional.

This commit is contained in:
mike12345567 2021-05-18 16:03:06 +01:00
parent 14cd1744ff
commit 1896b1fe52
2 changed files with 4 additions and 4 deletions

View File

@ -4,11 +4,11 @@
export let size = "M"
export let serif = false
export let noPadding = false
export let textAlign = "left"
export let textAlign
</script>
<p
style="text-align:{textAlign};"
style="{textAlign ? `text-align:${textAlign}` : ``}"
class:noPadding
class="spectrum-Body spectrum-Body--size{size}"
class:spectrum-Body--serif={serif}

View File

@ -3,12 +3,12 @@
// Sizes
export let size = "M"
export let textAlign = "left"
export let textAlign
export let noPadding = false
</script>
<h1
style="text-align:{textAlign};"
style="{textAlign ? `text-align:${textAlign}` : ``}"
class:noPadding
class="spectrum-Heading spectrum-Heading--size{size}"
>