status-desktop/storybook/pages/StatusFlowSelectorPage.qml
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

57 lines
1.2 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import utils 1.0
ColumnLayout {
Item {
Layout.fillHeight: true
Layout.fillWidth: true
StatusFlowSelector {
anchors.centerIn: parent
icon: Theme.png("tokens/SNT")
title: "Item Selector Title"
placeholderText: "Example: Empty items"
Repeater {
id: repeater
model: ListModel {
id: listModel
}
property int counter: 0
delegate: StatusListItemTag {
title: `tag ${model.name}`
onClicked: listModel.remove(index)
}
}
placeholderItem.visible: listModel.count === 0
addButton.onClicked: {
listModel.append({ name: `item ${repeater.counter++}` })
}
}
}
Button {
Layout.bottomMargin: 10
Layout.alignment: Qt.AlignHCenter
text: "Clear list"
onClicked: listModel.clear()
}
}
// category: Components