Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design Quality] Updated navbar title to remove green dot #12773

Merged
merged 6 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 8 additions & 38 deletions app/components/UI/NavbarTitle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,19 @@ import { selectProviderConfig } from '../../../selectors/networkController';
import { withMetricsAwareness } from '../../../components/hooks/useMetrics';
import Text, {
TextVariant,
TextColor,
} from '../../../component-library/components/Texts/Text';

const createStyles = (colors) =>
StyleSheet.create({
wrapper: {
justifyContent: 'center',
alignItems: 'center',
flex: 1,
},
network: {
flexDirection: 'row',
alignItems: 'center',
},
networkName: {
fontSize: 11,
color: colors.text.alternative,
...fontStyles.normal,
},
networkIcon: {
width: 5,
height: 5,
borderRadius: 100,
marginRight: 5,
},
title: {
fontSize: scale(14),
...fontStyles.normal,
color: colors.text.default,
},
children: {
...fontStyles.normal,
color: colors.text.default,
fontWeight: 'bold',
},
otherNetworkIcon: {
backgroundColor: importedColors.transparent,
borderColor: colors.border.default,
borderWidth: 1,
},
});

/**
Expand Down Expand Up @@ -163,26 +137,22 @@ class NavbarTitle extends PureComponent {
activeOpacity={this.props.disableNetwork ? 1 : 0.2}
>
{title ? (
<Text numberOfLines={1} style={styles.title}>
<Text numberOfLines={1} variant={TextVariant.BodyMDBold}>
{realTitle}
</Text>
) : null}
{typeof children === 'string' ? (
<Text variant={TextVariant.HeadingMD} style={styles.children}>
{strings(children)}
</Text>
<Text variant={TextVariant.BodyMDBold}>{strings(children)}</Text>
brianacnguyen marked this conversation as resolved.
Show resolved Hide resolved
) : (
children
)}
{showSelectedNetwork ? (
<View style={styles.network}>
<View
style={[
styles.networkIcon,
color ? { backgroundColor: color } : styles.otherNetworkIcon,
]}
/>
<Text numberOfLines={1} style={styles.networkName}>
<Text
numberOfLines={1}
variant={TextVariant.BodySM}
color={TextColor.Alternative}
>
{name}
</Text>
</View>
Expand Down
11 changes: 11 additions & 0 deletions app/components/Views/QRTabSwitcher/QRTabSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ButtonIcon, {
ButtonIconSizes,
} from '../../../component-library/components/Buttons/ButtonIcon';
import { IconName } from '../../../component-library/components/Icons/Icon';
import HeaderBase from '../../../component-library/components/HeaderBase';

export enum QRTabSwitcherScreens {
Scanner,
Expand Down Expand Up @@ -118,6 +119,16 @@ const QRTabSwitcher = () => {
) : null}

<View style={styles.overlay}>
<HeaderBase
endAccessory={
<ButtonIcon
style={styles.closeIcon}
iconName={IconName.Close}
size={ButtonIconSizes.Md}
onPress={goBack}
/>
}
/>
{selectedIndex === QRTabSwitcherScreens.Receive ? (
<NavbarTitle
// @ts-expect-error proptypes components requires ts-expect-error
Expand Down
2 changes: 0 additions & 2 deletions app/components/Views/QRTabSwitcher/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ const createStyles = (theme: Theme) => {
justifyContent: 'flex-start',
},
overlay: {
flexDirection: 'row',
justifyContent: 'flex-end',
position: 'absolute',
width: '100%',
top: navbarTop,
Expand Down
Loading