Property wrappers to aid in code extractions and organization.
Internally Ignite has several ElementBuilder typealias, it would be useful to have public facing property wrappers for them:
func bottomInfoSection()->BlockElement{
Text("Thank you for reading this page")
.font(.title6)
.id("bottom-info")
}
func bottomInfoSection()->BlockElement{
Group{
let id:String = "bottom-info"
Text("Thank you for reading this page")
.font(.title6)
.id(id)
Script(code:"document.getElementById('\(id)').addEventListener('contextmenu',e=>alert(e.target.innerText))")
}
}
❌ But these don't
//Error: Missing return in instance method expected to return 'any BlockElement'
func bottomInfoSection()->BlockElement{
let id:String = "bottom-info"
Text("Thank you for reading this page")
.font(.title6)
.id(id)
}
func bottomInfoSection()->BlockElement{
let id:String = "bottom-info"
Text("Thank you for reading this page")
.font(.title6)
.id(id)
Script(code:"document.getElementById('\(id)').addEventListener('contextmenu',e=>alert(e.target.innerText))")
}
Property wrappers to aid in code extractions and organization. Internally Ignite has several
ElementBuilder
typealias, it would be useful to have public facing property wrappers for them:✅ These compile
❌ But these don't
Something like: