1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

Add size option back to forms

This commit is contained in:
Andrew Kingston 2021-08-25 09:53:43 +01:00
parent 0a99020814
commit c8382596eb
2 changed files with 17 additions and 1 deletions

View file

@ -1725,6 +1725,21 @@
"label": "Custom" "label": "Custom"
} }
}, },
{
"type": "select",
"label": "Size",
"key": "size",
"options": [
{
"label": "Medium",
"value": "spectrum--medium"
}, {
"label": "Large",
"value": "spectrum--large"
}
],
"defaultValue": "spectrum--medium"
},
{ {
"type": "boolean", "type": "boolean",
"label": "Disabled", "label": "Disabled",

View file

@ -7,6 +7,7 @@
export let dataSource export let dataSource
export let disabled = false export let disabled = false
export let initialValues export let initialValues
export let size
const component = getContext("component") const component = getContext("component")
const { styleable, API, Provider, ActionTypes } = getContext("sdk") const { styleable, API, Provider, ActionTypes } = getContext("sdk")
@ -231,7 +232,7 @@
{actions} {actions}
data={{ ...$formState.values, tableId: dataSource?.tableId }} data={{ ...$formState.values, tableId: dataSource?.tableId }}
> >
<div use:styleable={$component.styles}> <div use:styleable={$component.styles} class={size}>
{#if loaded} {#if loaded}
<slot /> <slot />
{/if} {/if}