mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-27 07:14:56 +00:00
13 lines
343 B
Lua
13 lines
343 B
Lua
-- Text field component
|
|
local function text(props)
|
|
return {
|
|
type = "Box",
|
|
children = {
|
|
props.label and { type = "Label", props = { text = props.label, htmlFor = props.name } } or nil,
|
|
{ type = "Input", props = { name = props.name, placeholder = props.placeholder, required = props.required } }
|
|
}
|
|
}
|
|
end
|
|
|
|
return text
|