Skip to main content

Button-group

A setting of type button-group

Dùng để thiết lập giá trị theo thiết bị có sẵn

AttributeDescriptionrequire
deviceEnabledTurn on multiple devicesno
optionsbutton optionyes

Setting

    {
id: "button_group",
type: "button_group",
deviceEnabled: true,
label: "button_group",
options: [
{
label: "Label 1",
value: "value_1",
icon: "CancelMinor",
},
{
label: "Label 2",
value: "value_2",
icon: "FilterMinor",
},
],
default: {
desktop: "value_1",
},
},

Giao diện

alt

Khi truy cập giá trị của button-group ,dữ liệu được trả về dưới dạng:

{settings.button_group}

Output

  • Nếu deviceEnabled : true
{
"desktop": "value_1",
"tablet": "value_2"
}

-Nếu deviceEnabled : false

"value_1",