useMessageWithSignature
- Description
- Params and Return
- Example
Hook to add signature to a message
Param / Return | Description |
---|---|
returns | message state and the setMessage function |
How to use the useMessageWithSignature component
const [messageReply, setMessageReply] = useMessageWithSignature()
const goToCancel = () => {
replyCancelConfirmation({
origin: FormHeaderTypeConstants.reply,
replyToID: messageID,
messageData: { body: messageReply },
isFormValid: true,
})
}
{
fieldType: FieldType.TextInput,
fieldProps: {
inputType: 'none',
value: messageReply,
onChange: setMessageReply,
labelKey: 'health:secureMessaging.formMessage.message',
isRequiredField: true,
isTextArea: true,
setInputCursorToBeginning: true,
},
fieldErrorMessage: t('secureMessaging.formMessage.message.fieldError'),
},