namds/refactor-base-layout #8
|
|
@ -0,0 +1,18 @@
|
|||
import { LayoutComponentDefinition, LayoutContext } from "@vibentec/component-map"
|
||||
|
||||
export default function VtInput({
|
||||
nodes,
|
||||
context,
|
||||
}: {
|
||||
nodes: LayoutComponentDefinition
|
||||
context: LayoutContext
|
||||
}) {
|
||||
const props = nodes.config || {}
|
||||
return (
|
||||
<input
|
||||
className={props?.className ?? ""}
|
||||
type={props?.type ?? "text"}
|
||||
placeholder={props?.placeholder ?? ""}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ export default function VtText({
|
|||
const props = nodes.config || {}
|
||||
return (
|
||||
<span className={props?.className ?? ""}>
|
||||
{props?.label && <span>{props.label}</span>}
|
||||
{props?.label ?? ""}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue