status-desktop/storybook/pages/AirdropTokensSelectorPage.qml
Noelia 0ab8a62896 feat(Communities): Communities folder reorganization
- Renamed main `CommunitiesPortal` folder to `Communities`.
- Created new `layouts` folder.
- Moved layout files from chat to communities.
- Created new `helpers` folder.
- Moved helpers files from chat to communities.
- Moved `controls/community` files from chat to communities `controls`.
- Moved `panels/communities` files from chat to communities `panels`.
- Moved `popups/community` files from chat to communities `popups`.
- Moved `views/community` files from chat to communities `views`.
- Moved `CommunityBanner` file from shared to `Communities/controls`. Only used in communities context.
- Moved `CommunitySettingsView` and `CommunityColumnView` files from chat to communities `views`.
- Moved `PermissionsStore.qml` file to `shared/stores`.
- Updated imports.
- Updated storybook.

Part of #6204
2023-06-28 14:28:47 +02:00

63 lines
1.5 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import AppLayouts.Communities.controls 1.0
import utils 1.0
ColumnLayout {
readonly property var items: [
{
tokenText: "2 MCT",
networkText: "Ethereum",
tokenImage: Style.png("tokens/SNT"),
networkImage: Style.svg("network/Network=Ethereum"),
valid: true
},
{
tokenText: "64 DAI",
networkText: "Optimism",
tokenImage: Style.png("tokens/DAI"),
networkImage: Style.svg("network/Network=Optimism"),
valid: false
},
{
tokenText: "0.125 ETH",
networkText: "Arbitrum",
tokenImage: Style.png("tokens/ETH"),
networkImage: Style.svg("network/Network=Arbitrum"),
valid: true
}
]
Item {
Layout.fillHeight: true
Layout.fillWidth: true
AirdropTokensSelector {
anchors.centerIn: parent
placeholderText: "Example: Empty items"
property int counter: 0
model: ListModel {
id: listModel
}
addButton.onClicked: model.append(items[(counter++) % items.length])
onItemClicked: model.remove(index)
Component.onCompleted: model.append(items[counter++])
}
}
Button {
Layout.bottomMargin: 10
Layout.alignment: Qt.AlignHCenter
text: "Clear list"
onClicked: listModel.clear()
}
}