diff --git a/native/roles/create-roles-header-right-button.react.js b/native/roles/create-roles-header-right-button.react.js
--- a/native/roles/create-roles-header-right-button.react.js
+++ b/native/roles/create-roles-header-right-button.react.js
@@ -50,14 +50,35 @@
navigation,
]);
- return (
-
- Create
-
- );
+ const shouldHeaderRightBeDisabled = roleName.length === 0;
+ const createButton = React.useMemo(() => {
+ const textStyle = shouldHeaderRightBeDisabled
+ ? styles.createButtonDisabled
+ : styles.createButton;
+
+ return (
+
+ Create
+
+ );
+ }, [
+ shouldHeaderRightBeDisabled,
+ styles.createButtonDisabled,
+ styles.createButton,
+ onPressCreate,
+ ]);
+
+ return createButton;
}
const unboundStyles = {
+ createButtonDisabled: {
+ color: 'disabledButton',
+ marginRight: 10,
+ },
createButton: {
color: 'purpleLink',
marginRight: 10,