Add button setting to grid and allow removing all buttons
This commit is contained in:
parent
234cdbbf24
commit
0921bcf333
|
@ -19,7 +19,7 @@
|
|||
componentBindings: componentBindings || [],
|
||||
bindings,
|
||||
removeButton,
|
||||
canRemove: buttonCount > 1,
|
||||
canRemove: true,
|
||||
}
|
||||
|
||||
const sanitizeValue = val => {
|
||||
|
@ -86,11 +86,11 @@
|
|||
focus={focusItem}
|
||||
draggable={buttonCount > 1}
|
||||
/>
|
||||
|
||||
<div class="list-footer" on:click={addButton}>
|
||||
<div class="add-button">Add button</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="list-footer" on:click={addButton} class:empty={!buttonCount}>
|
||||
<div class="add-button">Add button</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
@ -120,6 +120,9 @@
|
|||
var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid));
|
||||
cursor: pointer;
|
||||
}
|
||||
.list-footer.empty {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.add-button {
|
||||
margin: var(--spacing-s);
|
||||
|
|
|
@ -5858,6 +5858,16 @@
|
|||
"label": "High contrast",
|
||||
"key": "stripeRows",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"section": true,
|
||||
"name": "Buttons",
|
||||
"settings": [
|
||||
{
|
||||
"type": "buttonConfiguration",
|
||||
"key": "buttons"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue