Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382173
D7725.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7725.diff
View Options
diff --git a/native/account/registration/cool-or-nerd-mode-selection.react.js b/native/account/registration/cool-or-nerd-mode-selection.react.js
--- a/native/account/registration/cool-or-nerd-mode-selection.react.js
+++ b/native/account/registration/cool-or-nerd-mode-selection.react.js
@@ -84,7 +84,11 @@
</Text>
</RegistrationTile>
</RegistrationContainer>
- <RegistrationButton onPress={onSubmit} label="Next" state={buttonState} />
+ <RegistrationButton
+ onPress={onSubmit}
+ label="Next"
+ variant={buttonState}
+ />
</View>
);
}
diff --git a/native/account/registration/keyserver-selection.react.js b/native/account/registration/keyserver-selection.react.js
--- a/native/account/registration/keyserver-selection.react.js
+++ b/native/account/registration/keyserver-selection.react.js
@@ -107,7 +107,11 @@
/>
</RegistrationTile>
</RegistrationContainer>
- <RegistrationButton onPress={onSubmit} label="Next" state={buttonState} />
+ <RegistrationButton
+ onPress={onSubmit}
+ label="Next"
+ variant={buttonState}
+ />
</View>
);
}
diff --git a/native/account/registration/registration-button.react.js b/native/account/registration/registration-button.react.js
--- a/native/account/registration/registration-button.react.js
+++ b/native/account/registration/registration-button.react.js
@@ -9,32 +9,32 @@
type Props = {
+onPress: () => mixed,
+label: string,
- +state?: 'enabled' | 'disabled' | 'loading',
+ +variant?: 'enabled' | 'disabled' | 'loading',
};
function RegistrationButton(props: Props): React.Node {
- const { onPress, label, state } = props;
+ const { onPress, label, variant } = props;
const styles = useStyles(unboundStyles);
const buttonStyle = React.useMemo(() => {
- if (state === 'disabled' || state === 'loading') {
+ if (variant === 'disabled' || variant === 'loading') {
return [styles.button, styles.disabledButton];
} else {
return styles.button;
}
- }, [state, styles.button, styles.disabledButton]);
+ }, [variant, styles.button, styles.disabledButton]);
const buttonTextStyle = React.useMemo(() => {
- if (state === 'disabled') {
+ if (variant === 'disabled') {
return [styles.buttonText, styles.disabledButtonText];
}
return styles.buttonText;
- }, [state, styles.buttonText, styles.disabledButtonText]);
+ }, [variant, styles.buttonText, styles.disabledButtonText]);
return (
<Button
onPress={onPress}
iosActiveOpacity={0.6}
style={buttonStyle}
- disabled={state === 'disabled' || state === 'loading'}
+ disabled={variant === 'disabled' || variant === 'loading'}
>
<Text style={buttonTextStyle}>{label}</Text>
</Button>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 8:51 AM (20 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596488
Default Alt Text
D7725.diff (2 KB)
Attached To
Mode
D7725: [native] Rename RegistrationButton state prop to variant
Attached
Detach File
Event Timeline
Log In to Comment