Skip to content

Commit

Permalink
Merge pull request #567 from cocrafts/chore/update-navigation-styles
Browse files Browse the repository at this point in the history
fix: broken rounded border image
  • Loading branch information
ltminhthu authored Jun 13, 2024
2 parents 65ff1a7 + bcd19f7 commit b45ef5a
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
1 change: 0 additions & 1 deletion apps/wallet/browser/kernel/utils/mockExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const mockLayoutCards: ExtensionDocument[] = [
storeMeta: {
iconUri: '/img/explore/logo-pixeverse.png',
iconSize: 40,
iconColor: '#ffffff',
coverUri: '/img/explore/thumbnail-pixeverse.png',
description:
'A hyper casual pixel-style game in which players step into the shoes of their ...',
Expand Down
15 changes: 14 additions & 1 deletion apps/wallet/src/features/Explorer/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const Header = () => {
<Text style={styles.helloText}>Hi 👋, your balance today:</Text>
<View style={styles.tokenValuationContainer}>
<Hoverable
style={!config.hideBalance && styles.eyeOffIcon}
onPress={() => {
setPrivacy(!config.hideBalance);
}}
Expand All @@ -35,7 +36,12 @@ const Header = () => {
<EyeOff color="#19A3E1" size={16} />
)}
</Hoverable>
<Text style={styles.tokenValuation}>
<Text
style={[
styles.tokenValuation,
config.hideBalance && styles.hiddenTokenValuation,
]}
>
{getValuationDisplay(valuation, config.hideBalance)}
</Text>
</View>
Expand Down Expand Up @@ -71,11 +77,18 @@ const styles = StyleSheet.create({
balanceContainer: {
gap: 4,
},
eyeOffIcon: {
top: 1,
},
tokenValuationContainer: {
flexDirection: 'row',
alignItems: 'center',
gap: 4,
},
hiddenTokenValuation: {
lineHeight: 21.5,
fontSize: 12,
},
tokenValuation: {
fontSize: 18,
color: '#ffffff',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ const HighlightItem: FC<HighlightItemProps> = ({ animation, widget }) => {
screen: 'Explore',
params: {
screen: 'Widget',
params: {
screen: 'Default',
params: { id },
},
params: { id },
},
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const styles = StyleSheet.create({
const getIconColor = (
isActive: boolean | undefined,
storeOptions: WidgetStoreOptions,
defaultColor = '#FFFFFF',
defaultColor = 'transparent',
) => {
if (isActive) {
return (
Expand Down
1 change: 0 additions & 1 deletion apps/wallet/src/state/widget/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const mockWidgets: WidgetDocument[] = [
storeMeta: {
iconUri: '/img/explore/logo-pixeverse.png',
iconSize: 40,
iconColor: '#ffffff',
coverUri: '/img/explore/thumbnail-pixeverse.png',
description:
'A hyper casual pixel-style game in which players step into the shoes of their ...',
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/src/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const isValidHttpUrl = (str: string) => {

export const getValuationDisplay = (valuation: number, isPrivate?: boolean) => {
if (isPrivate) {
return '******';
return '∗∗∗∗∗∗';
}

return `$${numeral(valuation).format('0.00')}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/utils/extension.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface ExtensionStoreMetadata {
iconUri: string;
iconSize: number;
iconColor: string;
iconColor?: string;
iconActiveColor?: string;
coverUri: string;
description: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/utils/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Networks } from './common';
export interface WidgetStoreOptions {
iconUri: string;
iconSize: number;
iconColor: string;
iconColor?: string;
iconActiveColor?: string;
coverUri: string;
description: string;
Expand Down

0 comments on commit b45ef5a

Please sign in to comment.