Add pretty labels to button props, ensure button width is always determined by content

This commit is contained in:
Andrew Kingston 2021-06-25 08:55:45 +01:00
parent d4f344aa14
commit 83a337e20e
2 changed files with 43 additions and 3 deletions

View File

@ -245,16 +245,49 @@
},
{
"type": "select",
"label": "Button Type",
"label": "Variant",
"key": "type",
"options": ["primary", "secondary", "cta", "warning"],
"options": [
{
"label": "Primary",
"value": "primary"
}, {
"label": "Secondary",
"value": "secondary"
},
{
"label": "Action",
"value": "cta"
},
{
"label": "Warning",
"value": "warning"
}
],
"defaultValue": "primary"
},
{
"type": "select",
"label": "Size",
"key": "size",
"options": ["S", "M", "L", "XL"],
"options": [
{
"label": "Small",
"value": "S"
},
{
"label": "Medium",
"value": "M"
},
{
"label": "Large",
"value": "L"
},
{
"label": "Extra large",
"value": "XL"
}
],
"defaultValue": "M"
},
{

View File

@ -19,3 +19,10 @@
>
{text || ""}
</button>
<style>
button {
width: fit-content;
width: -moz-fit-content;
}
</style>