1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00
budibase/packages/standard-components/src/forms/FieldGroup.svelte
2021-02-10 19:23:53 +00:00

28 lines
541 B
Svelte

<script>
import { getContext, setContext } from "svelte"
export let labelPosition = "above"
const { styleable } = getContext("sdk")
const component = getContext("component")
setContext("fieldGroup", { labelPosition })
</script>
<div class="wrapper" use:styleable={$component.styles}>
<div
class="spectrum-Form"
class:spectrum-Form--labelsAbove={labelPosition === 'above'}>
<slot />
</div>
</div>
<style>
.wrapper {
width: 100%;
position: relative;
}
.spectrum-Form {
width: 100%;
}
</style>