feat(storybook): Created page to test `BurnTokensPopup`

Updated storybook to test `BurnTokensPopup`.
This commit is contained in:
Noelia 2023-05-18 18:09:03 +02:00 committed by Noelia
parent a366e96999
commit a809185710
3 changed files with 135 additions and 0 deletions

View File

@ -149,6 +149,10 @@ ListModel {
title: "SequenceColumnLayout"
section: "Panels"
}
ListElement {
title: "BurnTokensPopup"
section: "Popups"
}
ListElement {
title: "InviteFriendsToCommunityPopup"
section: "Popups"

View File

@ -201,5 +201,10 @@
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=28570-546277&t=PVEC7ehRew4RnGFa-0",
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=8159%3A416159&t=bTEq7jsSZT0nfC4y-1",
"https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile?node-id=17582-215241&t=8cRmw5jIlzUtfJbY-0"
],
"BurnTokensPopup": [
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A588403&t=GUxMZEWcfRO7pXJb-1",
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A588563&t=GUxMZEWcfRO7pXJb-1",
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29528%3A587660&t=GUxMZEWcfRO7pXJb-1"
]
}

View File

@ -0,0 +1,126 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import Storybook 1.0
import Models 1.0
import AppLayouts.Chat.popups.community 1.0
SplitView {
Logs { id: logs }
SplitView {
orientation: Qt.Vertical
SplitView.fillWidth: true
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
PopupBackground {
anchors.fill: parent
}
Button {
anchors.centerIn: parent
text: "Reopen"
onClicked: dialog.open()
}
BurnTokensPopup {
id: dialog
anchors.centerIn: parent
communityName: editorCommunity.text
tokenName: editorToken.text
remainingTokens: editorAmount.text
isAsset: assetButton.checked
tokenSource: assetButton.checked ? ModelsData.assets.socks : ModelsData.collectibles.kitty1Big
onBurnClicked: logs.logEvent("BurnTokensPopup::onBurnClicked --> Burn amount: " + burnAmount)
onCancelClicked: logs.logEvent("BurnTokensPopup::onCancelClicked")
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 150
logsView.logText: logs.logText
}
}
Pane {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Community name:"
}
TextField {
id: editorCommunity
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Community lovers"
}
Label {
Layout.fillWidth: true
Layout.topMargin: 16
text: "Token name:"
}
TextField {
id: editorToken
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Anniversary"
}
Label {
Layout.fillWidth: true
Layout.topMargin: 16
text: "Amount to burn:"
}
TextField {
id: editorAmount
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "123"
}
Label {
Layout.fillWidth: true
Layout.topMargin: 16
text: "Token source:"
}
RadioButton {
id: assetButton
text: "Asset"
checked: true
}
RadioButton {
id: collectibleButton
text: "Collectible"
}
}
}
}