mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 22:06:25 +00:00
5e6db4d2ff
Banner items are created as per design. Banner items support customizable close button. Banner items have hove state as per design. Banner items are added to storybook with all possible configurations. Banner items have a close animation including fade-out and the remaining item occupy the empty space. QML tests are added.
60 lines
1.4 KiB
QML
60 lines
1.4 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import AppLayouts.Wallet.controls 1.0
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
SplitView {
|
|
id: root
|
|
Pane {
|
|
id: leftPane
|
|
SplitView.fillWidth: true
|
|
SplitView.fillHeight: true
|
|
BannerCard {
|
|
anchors.centerIn: parent
|
|
title: titleField.text
|
|
subTitle: subTitleField.text
|
|
image: Theme.png("wallet/wallet-green")
|
|
closeEnabled: closeEnabled.checked
|
|
onClicked: {
|
|
print("BannerCard clicked")
|
|
}
|
|
onClose: {
|
|
print("BannerCard closed")
|
|
}
|
|
}
|
|
}
|
|
Pane {
|
|
id: rightPane
|
|
SplitView.fillHeight: true
|
|
SplitView.preferredWidth: 300
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
CheckBox {
|
|
id: closeEnabled
|
|
text: "Show close button"
|
|
checked: true
|
|
}
|
|
Label {
|
|
text: "Title"
|
|
}
|
|
TextField {
|
|
id: titleField
|
|
text: "Ways to buy crypto"
|
|
}
|
|
Label {
|
|
text: "Sub title"
|
|
}
|
|
TextField {
|
|
id: subTitleField
|
|
text: "Via card or bank transfer"
|
|
}
|
|
Item {
|
|
Layout.fillHeight: true
|
|
}
|
|
}
|
|
}
|
|
}
|