feat(storybook): Added support to `TokenHoldersPanel`

Added support to `TokenHoldersPanel`.
Updated  `TokenHoldersModel`.
This commit is contained in:
Noelia 2023-03-31 12:21:11 +02:00 committed by Noelia
parent dbf05f4a58
commit b3b53de9ea
3 changed files with 65 additions and 4 deletions

View File

@ -97,6 +97,10 @@ ListModel {
title: "ChatAnchorButtonsPanel"
section: "Panels"
}
ListElement {
title: "TokenHoldersPanel"
section: "Panels"
}
ListElement {
title: "InviteFriendsToCommunityPopup"
section: "Popups"

View File

@ -0,0 +1,48 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import StatusQ.Core 0.1
import mainui 1.0
import AppLayouts.Chat.panels.communities 1.0
import Storybook 1.0
import Models 1.0
SplitView {
id: root
Logs { id: logs }
orientation: Qt.Vertical
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
TokenHoldersPanel {
anchors.centerIn: parent
width: 568
tokenName: "Aniversary"
model: TokenHoldersModel {}
isSelectorMode: editorSelectorMode.checked
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
CheckBox {
id: editorSelectorMode
text: "Is selector mode?"
checked: true
}
}
}

View File

@ -9,25 +9,34 @@ ListModel {
ensName: "carmen.eth",
walletAddress: "0xb794f5450ba39494ce839613fffba74279579268",
imageSource: image,
amount: 3
amount: 15,
selfDestructAmount: 2,
selfDestruct: false
},
{
ensName: "chris.eth",
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
imageSource: image,
amount: 2
amount: 5,
selfDestructAmount: 4,
selfDestruct: false
},
{
ensName: "emily.eth",
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
imageSource: image,
amount: 2
amount: 2,
selfDestructAmount: 2,
selfDestruct: false
},
{
ensName: "",
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
imageSource: "",
amount: 1
amount: 1,
selfDestructAmount: 1,
selfDestruct: false
}
]