budibase/packages/bbui/src/Typography/Body.svelte

28 lines
415 B
Svelte
Raw Normal View History

2021-04-14 10:53:23 +02:00
<script>
2021-04-30 13:33:50 +02:00
import "@spectrum-css/typography/dist/index-vars.css"
export let size = "M"
export let serif = false
2021-05-06 14:58:23 +02:00
export let noPadding = false
2021-04-14 10:53:23 +02:00
</script>
2021-04-30 13:33:50 +02:00
<p
2021-05-06 14:58:23 +02:00
class:noPadding
2021-05-06 15:10:54 +02:00
class="spectrum-Body spectrum-Body--size{size}"
2021-05-10 15:50:37 +02:00
class:spectrum-Body--serif={serif}
>
2021-04-30 13:33:50 +02:00
<slot />
</p>
2021-05-06 14:58:23 +02:00
<style>
2021-05-10 13:06:31 +02:00
p {
margin-top: 0.75em;
margin-bottom: 0.75em;
}
2021-05-06 14:58:23 +02:00
.noPadding {
padding: 0;
margin: 0;
}
</style>