-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Wire up form component to formio render component
- Loading branch information
1 parent
ddba1bf
commit 68d85cf
Showing
3 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import type {TextFieldComponentSchema} from '@open-formulieren/types'; | ||
|
||
export interface TextFieldProps { | ||
import TextField from '@/components/forms/TextField'; | ||
|
||
export interface FormioTextFieldProps { | ||
componentDefinition: TextFieldComponentSchema; | ||
} | ||
|
||
const TextField: React.FC<TextFieldProps> = ({componentDefinition: {key, label}}) => { | ||
const FormioTextField: React.FC<FormioTextFieldProps> = ({ | ||
componentDefinition: {key, label, description, validate}, | ||
}) => { | ||
return ( | ||
<div> | ||
I am a text field with name {key} and label {label}! | ||
</div> | ||
<TextField name={key} label={label} description={description} isRequired={validate?.required} /> | ||
); | ||
}; | ||
|
||
export default TextField; | ||
export default FormioTextField; |