You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct TextFiled: Encodable {
var `class`: String?
var title: String?
var name: String?
var placeholder: String?
var value: String?
var type: String?
var accept: String?
}
struct Form: Encodable {
var email: TextFiled
var phone: TextFiled
var address: TextFiled
}
You can print out the context in the render function when debugging to see how it's passed in, but it should be something like email.name - Leaf uses Codable so it's based off keys rather than types
So I have reusable HTML component, ex textfield. For example its look like this:
textfield.leaf
Also I have data for this HTML component:
I send data to render like this:
And I can't realise how to pass data to reusable textfields?
Intuitively it should be something like this, but it doesn't work.
Thanks for any help how to do it.
The text was updated successfully, but these errors were encountered: