Add gap to container settings and remove some colours from color picker
This commit is contained in:
parent
35c9b4ff2f
commit
3074b3894f
|
@ -22,8 +22,6 @@
|
||||||
label: "Grays",
|
label: "Grays",
|
||||||
colors: [
|
colors: [
|
||||||
"white",
|
"white",
|
||||||
"gray-50",
|
|
||||||
"gray-75",
|
|
||||||
"gray-100",
|
"gray-100",
|
||||||
"gray-200",
|
"gray-200",
|
||||||
"gray-300",
|
"gray-300",
|
||||||
|
|
|
@ -174,6 +174,32 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"defaultValue": "shrink"
|
"defaultValue": "shrink"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "select",
|
||||||
|
"label": "Gap",
|
||||||
|
"key": "gap",
|
||||||
|
"showInBar": true,
|
||||||
|
"barStyle": "picker",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"label": "None",
|
||||||
|
"value": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Small",
|
||||||
|
"value": "S"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Medium",
|
||||||
|
"value": "M"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Large",
|
||||||
|
"value": "L"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"defaultValue": "M"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -368,7 +394,7 @@
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"label": "Size",
|
"label": "Size",
|
||||||
"key": "size",
|
"key": "size",
|
||||||
"defaultValue": "Medium",
|
"defaultValue": "M",
|
||||||
"showInBar": true,
|
"showInBar": true,
|
||||||
"barStyle": "picker",
|
"barStyle": "picker",
|
||||||
"options": [{
|
"options": [{
|
||||||
|
@ -462,7 +488,7 @@
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"label": "Size",
|
"label": "Size",
|
||||||
"key": "size",
|
"key": "size",
|
||||||
"defaultValue": "Medium",
|
"defaultValue": "M",
|
||||||
"showInBar": true,
|
"showInBar": true,
|
||||||
"barStyle": "picker",
|
"barStyle": "picker",
|
||||||
"options": [{
|
"options": [{
|
||||||
|
|
|
@ -8,17 +8,23 @@
|
||||||
export let hAlign
|
export let hAlign
|
||||||
export let vAlign
|
export let vAlign
|
||||||
export let size
|
export let size
|
||||||
|
export let gap
|
||||||
|
|
||||||
$: directionClass = direction ? `valid-container direction-${direction}` : ""
|
$: directionClass = direction ? `valid-container direction-${direction}` : ""
|
||||||
$: hAlignClass = hAlign ? `hAlign-${hAlign}` : ""
|
$: hAlignClass = hAlign ? `hAlign-${hAlign}` : ""
|
||||||
$: vAlignClass = vAlign ? `vAlign-${vAlign}` : ""
|
$: vAlignClass = vAlign ? `vAlign-${vAlign}` : ""
|
||||||
$: sizeClass = size ? `size-${size}` : ""
|
$: sizeClass = size ? `size-${size}` : ""
|
||||||
|
$: gapClass = gap ? `gap-${gap}` : ""
|
||||||
|
$: classNames = [
|
||||||
|
directionClass,
|
||||||
|
hAlignClass,
|
||||||
|
vAlignClass,
|
||||||
|
sizeClass,
|
||||||
|
gapClass,
|
||||||
|
].join(" ")
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div class={classNames} use:styleable={$component.styles}>
|
||||||
class={[directionClass, hAlignClass, vAlignClass, sizeClass].join(" ")}
|
|
||||||
use:styleable={$component.styles}
|
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -83,4 +89,14 @@
|
||||||
.direction-column.hAlign-stretch {
|
.direction-column.hAlign-stretch {
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gap-S {
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.gap-M {
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
.gap-L {
|
||||||
|
gap: 32px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue