forked from Shinonome/dots-hyprland
bar: component loader
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import QtQuick
|
||||
import qs.modules.common as C
|
||||
|
||||
FallbackLoader {
|
||||
id: root
|
||||
|
||||
required property string componentName
|
||||
property string context // Path for the builtin component
|
||||
|
||||
readonly property string componentNameWithExt: componentName.endsWith(".qml") ? componentName : `${componentName}.qml`
|
||||
|
||||
source: `${C.Directories.userComponents}/${componentNameWithExt}`
|
||||
fallbacks: [
|
||||
...(context ? [ `${context}/${componentNameWithExt}` ] : []),
|
||||
componentNameWithExt
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user