From ae7c838ac7e4318e4c649177d65775dbec0fd3bd Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Fri, 1 Jul 2022 12:41:21 -0700 Subject: [PATCH 1/5] allow for custom buttons --- src/components/FormAlertWithSubmitButton.js | 24 ++++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/FormAlertWithSubmitButton.js b/src/components/FormAlertWithSubmitButton.js index 82cff4bf3838..49c2d111c318 100644 --- a/src/components/FormAlertWithSubmitButton.js +++ b/src/components/FormAlertWithSubmitButton.js @@ -17,6 +17,9 @@ import networkPropTypes from './networkPropTypes'; import {withNetwork} from './OnyxProvider'; const propTypes = { + /** Children to wrap */ + children: PropTypes.node, + /** Whether to show the alert text */ isAlertVisible: PropTypes.bool.isRequired, @@ -51,6 +54,7 @@ const propTypes = { }; const defaultProps = { + children: null, message: '', isDisabled: false, isMessageHtml: false, @@ -124,14 +128,18 @@ const FormAlertWithSubmitButton = (props) => { {getAlertPrompt()} )} -