1
0
Fork 0
mirror of synced 2024-06-02 02:25:17 +12:00

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 5f83ee6813
commit 937479986d
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>