feat(storybook): add CommunityIntroDialogPage

This commit is contained in:
Patryk Osmaczko 2023-01-05 21:03:18 +01:00 committed by osmaczko
parent 6f1ecb9c8c
commit 3cc3f3ea85
2 changed files with 109 additions and 0 deletions

View File

@ -65,6 +65,10 @@ ListModel {
title: "InDropdown"
section: "Popups"
}
ListElement {
title: "CommunityIntroDialog"
section: "Popups"
}
ListElement {
title: "MembersSelector"
section: "Components"

View File

@ -0,0 +1,105 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import Storybook 1.0
import Models 1.0
import shared.popups 1.0
SplitView {
SplitView {
orientation: Qt.Vertical
SplitView.fillWidth: true
Logs { id: logs }
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
PopupBackground {
anchors.fill: parent
}
Button {
anchors.centerIn: parent
text: "Reopen"
onClicked: dialog.open()
}
CommunityIntroDialog {
id: dialog
anchors.centerIn: parent
visible: true
name: "test"
introMessage: "Welcome to the Status CCs community. Only Status CCs are allowed in this community."
imageSrc: ModelsData.icons.cryptoKitty
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
}
}
Pane {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
ColumnLayout {
anchors.fill: parent
Label {
Layout.fillWidth: true
text: "name"
font.weight: Font.Bold
}
TextField {
Layout.fillWidth: true
text: dialog.name
onTextChanged: dialog.name = text
}
Label {
Layout.fillWidth: true
text: "intro message"
font.weight: Font.Bold
}
TextField {
Layout.fillWidth: true
text: dialog.introMessage
onTextChanged: dialog.introMessage = text
}
CheckBox {
text: "icon"
checked: true
onToggled: {
if (checked) {
dialog.imageSrc = ModelsData.icons.cryptoKitty
} else {
dialog.imageSrc = ""
}
}
}
Item {
Layout.fillHeight: true
}
}
}
}