logos-storage-app-skeleton/src/qml/LogosTextField.qml

28 lines
674 B
QML
Raw Normal View History

2026-02-17 11:29:04 +04:00
import QtQuick
import QtQuick.Controls
import Logos.Theme
TextField {
id: root
property bool isValid: acceptableInput && text.length > 0
placeholderTextColor: Theme.palette.textPlaceholder
color: isValid ? Theme.palette.text : Theme.palette.error
selectByMouse: true
background: Rectangle {
Rectangle {
anchors.fill: parent
color: Theme.palette.backgroundSecondary
}
// Border bottom
Rectangle {
anchors.bottom: parent.bottom
width: parent.width
height: 1
color: root.isValid ? Theme.palette.textMuted : Theme.palette.error
}
}
}