29 lines
720 B
TypeScript
29 lines
720 B
TypeScript
/**
|
|
* Comment node config
|
|
*/
|
|
|
|
import React from 'react';
|
|
import type { NodeConfigRendererProps } from './types';
|
|
|
|
export const CommentNodeConfig: React.FC<NodeConfigRendererProps> = ({ params, updateParam }) => (
|
|
<>
|
|
<div>
|
|
<label>Platzhalter</label>
|
|
<input
|
|
value={(params.placeholder as string) ?? ''}
|
|
onChange={(e) => updateParam('placeholder', e.target.value)}
|
|
placeholder="Kommentar eingeben..."
|
|
/>
|
|
</div>
|
|
<div>
|
|
<label>
|
|
<input
|
|
type="checkbox"
|
|
checked={(params.required as boolean) ?? true}
|
|
onChange={(e) => updateParam('required', e.target.checked)}
|
|
/>
|
|
Pflichtfeld
|
|
</label>
|
|
</div>
|
|
</>
|
|
);
|