2021-01-28 07:25:57 +13:00
|
|
|
<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}>
|
2021-02-03 02:50:46 +13:00
|
|
|
<div
|
2021-01-28 07:25:57 +13:00
|
|
|
class="spectrum-Form"
|
|
|
|
class:spectrum-Form--labelsAbove={labelPosition === 'above'}>
|
|
|
|
<slot />
|
2021-02-03 02:50:46 +13:00
|
|
|
</div>
|
2021-01-28 07:25:57 +13:00
|
|
|
</div>
|