diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js
index 36ebd811a..3ccb2b06f 100644
--- a/native/account/registration/connect-ethereum.react.js
+++ b/native/account/registration/connect-ethereum.react.js
@@ -1,147 +1,147 @@
// @flow
import * as React from 'react';
import { Text, View } from 'react-native';
import RegistrationButtonContainer from './registration-button-container.react.js';
import RegistrationButton from './registration-button.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
import type { NavigationRoute } from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
import EthereumLogoDark from '../../vectors/ethereum-logo-dark.react.js';
export type ConnectEthereumParams = {
+userSelections: {
+coolOrNerdMode: CoolOrNerdMode,
+keyserverUsername: string,
},
};
type Props = {
+navigation: RegistrationNavigationProp<'ConnectEthereum'>,
+route: NavigationRoute<'ConnectEthereum'>,
};
function ConnectEthereum(props: Props): React.Node {
const onConnect = React.useCallback(() => {}, []);
const onSkip = React.useCallback(() => {}, []);
const isNerdMode =
props.route.params.userSelections.coolOrNerdMode === 'nerd';
const styles = useStyles(unboundStyles);
let body;
if (!isNerdMode) {
body = (
Connecting your Ethereum wallet allows you to use your ENS name and
avatar in the app. You'll also be able to log in with your wallet
instead of a password.
);
} else {
body = (
<>
Connecting your Ethereum wallet has three benefits:
{'1. '}
Your peers will be able to cryptographically verify that your Comm
account is associated with your Ethereum wallet.
{'2. '}
You'll be able to use your ENS name and avatar in the app.
{'3. '}
You can choose to skip setting a password, and to log in with your
Ethereum wallet instead.
>
);
}
return (
Do you want to connect an Ethereum Wallet to your account?
{body}
);
}
const unboundStyles = {
container: {
backgroundColor: 'panelBackground',
justifyContent: 'space-between',
flex: 1,
},
scrollViewContentContainer: {
flexGrow: 1,
},
header: {
fontSize: 24,
color: 'panelForegroundLabel',
paddingBottom: 16,
},
body: {
fontSize: 15,
lineHeight: 20,
color: 'panelForegroundSecondaryLabel',
paddingBottom: 16,
},
ethereumLogoContainer: {
flexGrow: 1,
alignItems: 'center',
justifyContent: 'center',
},
list: {
paddingBottom: 16,
},
listItem: {
flexDirection: 'row',
},
listItemNumber: {
fontWeight: 'bold',
fontSize: 15,
lineHeight: 20,
color: 'panelForegroundSecondaryLabel',
},
listItemContent: {
flexShrink: 1,
fontSize: 15,
lineHeight: 20,
color: 'panelForegroundSecondaryLabel',
},
};
export default ConnectEthereum;
diff --git a/native/account/registration/registration-button.react.js b/native/account/registration/registration-button.react.js
index cafe64141..64d38e8e9 100644
--- a/native/account/registration/registration-button.react.js
+++ b/native/account/registration/registration-button.react.js
@@ -1,64 +1,71 @@
// @flow
import * as React from 'react';
import { Text } from 'react-native';
import Button from '../../components/button.react.js';
import { useStyles } from '../../themes/colors.js';
type Props = {
+onPress: () => mixed,
+label: string,
- +variant?: 'enabled' | 'disabled' | 'loading',
+ +variant?: 'enabled' | 'disabled' | 'loading' | 'outline',
};
function RegistrationButton(props: Props): React.Node {
const { onPress, label, variant } = props;
const styles = useStyles(unboundStyles);
const buttonStyle = React.useMemo(() => {
if (variant === 'disabled' || variant === 'loading') {
return [styles.button, styles.disabledButton];
+ } else if (variant === 'outline') {
+ return [styles.button, styles.outlineButton];
} else {
return styles.button;
}
- }, [variant, styles.button, styles.disabledButton]);
+ }, [variant, styles.button, styles.disabledButton, styles.outlineButton]);
const buttonTextStyle = React.useMemo(() => {
if (variant === 'disabled') {
return [styles.buttonText, styles.disabledButtonText];
}
return styles.buttonText;
}, [variant, styles.buttonText, styles.disabledButtonText]);
return (
);
}
const unboundStyles = {
button: {
backgroundColor: 'purpleButton',
borderRadius: 8,
marginVertical: 8,
},
buttonText: {
fontSize: 18,
color: 'panelForegroundLabel',
textAlign: 'center',
padding: 12,
},
disabledButton: {
backgroundColor: 'disabledButton',
},
+ outlineButton: {
+ backgroundColor: 'panelBackground',
+ borderColor: 'panelForegroundLabel',
+ borderWidth: 1,
+ },
disabledButtonText: {
color: 'disabledButtonText',
},
};
export default RegistrationButton;