2
0
mirror of https://github.com/status-im/status-desktop.git synced 2025-01-24 05:21:58 +00:00
Lukáš Tinkl 7a407662e2 feat: New Profile Modal
Fixes: 
2022-10-17 12:05:54 +02:00

36 lines
703 B
QML

import QtQuick 2.13
import StatusQ.Controls 0.1
import utils 1.0
StatusRoundButton {
id: copyToClipboardButton
property var onClick: function() {}
property string textToCopy: ""
property bool tooltipUnder: false
property var store
icon.name: "copy"
onPressed: {
if (!toolTip.visible) {
toolTip.visible = true
}
}
onClicked: {
if (textToCopy) {
store.copyToClipboard(textToCopy)
}
onClick()
}
StatusToolTip {
id: toolTip
text: qsTr("Copied!")
orientation: tooltipUnder ? StatusToolTip.Orientation.Bottom: StatusToolTip.Orientation.Top
timeout: 2000
}
}