Page MenuHomePhabricator

D7725.id26207.diff
No OneTemporary

D7725.id26207.diff

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

Mime Type
text/plain
Expires
Fri, Nov 29, 10:39 AM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596488
Default Alt Text
D7725.id26207.diff (2 KB)

Event Timeline