diff --git a/src/ROUTES.js b/src/ROUTES.js index 99ceddcdcf91..d77cf02ed13a 100644 --- a/src/ROUTES.js +++ b/src/ROUTES.js @@ -52,11 +52,13 @@ export default { VALIDATE_LOGIN_WITH_VALIDATE_CODE: 'v/:accountID/:validateCode', ENABLE_PAYMENTS: 'enable-payments', WORKSPACE_NEW: 'workspace/new', - WORKSPACE_CARD: ':policyID/card', WORKSPACE: 'workspace', + WORKSPACE_CARD: ':policyID/card', + WORKSPACE_PEOPLE: ':policyID/people', getWorkspaceCardRoute: policyID => `workspace/${policyID}/card`, - WORKSPACE_INVITE: 'workspace/:policyID/invite', + getWorkspacePeopleRoute: policyID => `workspace/${policyID}/people`, getWorkspaceInviteRoute: policyID => `workspace/${policyID}/invite`, + WORKSPACE_INVITE: 'workspace/:policyID/invite', REQUEST_CALL: 'request-call', /** diff --git a/src/components/Button.js b/src/components/Button.js index 6ec8633a20f9..cbdfc99122fa 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -36,6 +36,9 @@ const propTypes = { /** Whether we should use the success theme color */ success: PropTypes.bool, + /** Whether we should use the danger theme color */ + danger: PropTypes.bool, + /** Optional content component to replace all inner contents of button */ ContentComponent: PropTypes.func, @@ -55,6 +58,7 @@ const defaultProps = { style: [], textStyles: [], success: false, + danger: false, ContentComponent: undefined, shouldRemoveRightBorderRadius: false, shouldRemoveLeftBorderRadius: false, @@ -79,6 +83,7 @@ const Button = (props) => { styles.buttonText, props.large && styles.buttonLargeText, props.success && styles.buttonSuccessText, + props.danger && styles.buttonDangerText, ...props.textStyles, ]} > @@ -102,8 +107,11 @@ const Button = (props) => { styles.button, props.large ? styles.buttonLarge : undefined, props.success ? styles.buttonSuccess : undefined, - props.isDisabled ? styles.buttonDisable : undefined, + props.danger ? styles.buttonDanger : undefined, + (props.isDisabled && props.danger) ? styles.buttonDangerDisabled : undefined, + (props.isDisabled && !props.danger) ? styles.buttonDisable : undefined, (props.success && hovered) ? styles.buttonSuccessHovered : undefined, + (props.danger && hovered) ? styles.buttonDangerHovered : undefined, props.shouldRemoveRightBorderRadius ? styles.noRightBorderRadius : undefined, props.shouldRemoveLeftBorderRadius ? styles.noLeftBorderRadius : undefined, ]} diff --git a/src/components/ConfirmModal.js b/src/components/ConfirmModal.js index bb2a2a9ea1f2..7e13a2ed68ec 100755 --- a/src/components/ConfirmModal.js +++ b/src/components/ConfirmModal.js @@ -32,6 +32,9 @@ const propTypes = { /** Modal content text */ prompt: PropTypes.string, + /** Is the action destructive */ + danger: PropTypes.bool, + ...withLocalizePropTypes, ...windowDimensionsPropTypes, @@ -41,6 +44,7 @@ const defaultProps = { confirmText: '', cancelText: '', prompt: '', + danger: false, }; const ConfirmModal = props => ( @@ -63,6 +67,7 @@ const ConfirmModal = props => (