1
0
Fork 0
mirror of synced 2024-09-28 15:21:28 +12:00
budibase/packages/standard-components/src/forms/FieldGroup.svelte

18 lines
409 B
Svelte
Raw Normal View History

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