1
0
Fork 0
mirror of synced 2024-09-28 07:11:40 +12:00
budibase/packages/bbui/src/Typography/Body.svelte

30 lines
527 B
Svelte
Raw Normal View History

2021-04-14 20:53:23 +12:00
<script>
2021-04-30 23:33:50 +12:00
import "@spectrum-css/typography/dist/index-vars.css"
export let size = "M"
export let serif = false
2021-05-07 00:58:23 +12:00
export let noPadding = false
export let weight = 400
2021-05-18 04:49:40 +12:00
export let textAlign = "left"
2021-04-14 20:53:23 +12:00
</script>
2021-04-30 23:33:50 +12:00
<p
style="font-weight:{weight};text-align:{textAlign};"
2021-05-07 00:58:23 +12:00
class:noPadding
2021-05-07 01:10:54 +12:00
class="spectrum-Body spectrum-Body--size{size}"
2021-05-11 01:50:37 +12:00
class:spectrum-Body--serif={serif}
>
2021-04-30 23:33:50 +12:00
<slot />
</p>
2021-05-07 00:58:23 +12:00
<style>
2021-05-10 23:06:31 +12:00
p {
margin-top: 0.75em;
margin-bottom: 0.75em;
}
2021-05-07 00:58:23 +12:00
.noPadding {
padding: 0;
margin: 0;
}
</style>