33 lines
895 B
TypeScript
33 lines
895 B
TypeScript
/**
|
|
* Confirmation node config
|
|
*/
|
|
|
|
import React from 'react';
|
|
import type { NodeConfigRendererProps } from './types';
|
|
|
|
export const ConfirmationNodeConfig: React.FC<NodeConfigRendererProps> = ({ params, updateParam }) => (
|
|
<>
|
|
<div>
|
|
<label>Frage</label>
|
|
<input
|
|
value={(params.question as string) ?? ''}
|
|
onChange={(e) => updateParam('question', e.target.value)}
|
|
placeholder="Möchten Sie bestätigen?"
|
|
/>
|
|
</div>
|
|
<div>
|
|
<label>Bestätigen-Button</label>
|
|
<input
|
|
value={(params.confirmLabel as string) ?? 'Confirm'}
|
|
onChange={(e) => updateParam('confirmLabel', e.target.value)}
|
|
/>
|
|
</div>
|
|
<div>
|
|
<label>Ablehnen-Button</label>
|
|
<input
|
|
value={(params.rejectLabel as string) ?? 'Reject'}
|
|
onChange={(e) => updateParam('rejectLabel', e.target.value)}
|
|
/>
|
|
</div>
|
|
</>
|
|
);
|