mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-10 13:46:35 +00:00
This property enables users to load any component into the input field. This is useful for rendering a "clearable" icon button, simple icons or even more complex buttons. Usage: ```qml StatusBaseInput { ... component: StatusIcon { name: "cancel" color: Theme.palette.dangerColor1 width: 16 } } ``` The `clearable` property of `StatusBaseInput` also renders and icon button on the right hand side. With this new feature, `clearable` is just a short-hand for: ```qml StatusBaseInput { ... component: StatusFlatRoundButton { visible: edit.text.length != 0 && statusBaseInput.clearable && !statusBaseInput.multiline && edit.activeFocus type: StatusFlatRoundButton.Type.Secondary width: 24 height: 24 icon.name: "clear" icon.width: 16 icon.height: 16 icon.color: Theme.palette.baseColor1 onClicked: { edit.clear() } } } ``` Closes #380