Skip to content

Commit

Permalink
Merge pull request #2 from chainapsis/fix-chart-animation
Browse files Browse the repository at this point in the history
feat : main page view
  • Loading branch information
wseungjin authored Apr 14, 2021
2 parents 82ffa81 + 276113a commit b6449bb
Show file tree
Hide file tree
Showing 15 changed files with 751 additions and 92 deletions.
31 changes: 2 additions & 29 deletions packages/mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -321,35 +321,8 @@ PODS:
- React-Core
- RNGestureHandler (1.10.3):
- React-Core
- RNReanimated (2.0.1):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
- Folly
- glog
- RCTRequired
- RCTTypeSafety
- React
- React-callinvoker
- RNReanimated (1.13.3):
- React-Core
- React-Core/DevSupport
- React-Core/RCTWebSocket
- React-CoreModules
- React-cxxreact
- React-jsi
- React-jsiexecutor
- React-jsinspector
- React-RCTActionSheet
- React-RCTAnimation
- React-RCTBlob
- React-RCTImage
- React-RCTLinking
- React-RCTNetwork
- React-RCTSettings
- React-RCTText
- React-RCTVibration
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (2.18.1):
- React-Core
- RNSVG (12.1.0):
Expand Down Expand Up @@ -623,7 +596,7 @@ SPEC CHECKSUMS:
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNCPicker: a3f85bfd04ab192fe9a8fe7485b5ef4f80e59022
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: c5e9d841d33ed7f83861462756cec7146e73afaa
RNReanimated: 514a11da3a2bcc6c3dfd9de32b38e2b9bf101926
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
Expand Down
3 changes: 2 additions & 1 deletion packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@react-navigation/stack": "^5.14.3",
"buffer": "^6.0.3",
"eventemitter3": "^4.0.7",
"expo-clipboard": "^1.0.1",
"expo-random": "^11.0.0",
"expo-standard-web-crypto": "^1.0.0",
"http-browserify": "^1.7.0",
Expand All @@ -49,7 +50,7 @@
"react-native-gesture-handler": "^1.10.3",
"react-native-modal": "^11.7.0",
"react-native-picker-select": "^8.0.4",
"react-native-reanimated": "^2.0.0",
"react-native-reanimated": "^1.13.3",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.18.1",
"react-native-svg": "^12.1.0",
Expand Down
9 changes: 6 additions & 3 deletions packages/mobile/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React, { FunctionComponent } from "react";
import { StoreProvider } from "./stores";
import { AppNavigation } from "./navigation";
import { GlobalThemeProvider } from "./global-theme";

export const App: FunctionComponent = () => {
return (
<StoreProvider>
<AppNavigation />
</StoreProvider>
<GlobalThemeProvider>
<StoreProvider>
<AppNavigation />
</StoreProvider>
</GlobalThemeProvider>
);
};
28 changes: 28 additions & 0 deletions packages/mobile/src/components/address/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React, { FunctionComponent } from "react";

import { Text } from "react-native-elements";
import { View } from "react-native";
import { Bech32Address } from "@keplr-wallet/cosmos";

export interface AddressProps {
maxCharacters: number;
address: string;
}

export const Address: FunctionComponent<AddressProps> = ({
maxCharacters,
address,
}) => {
return (
<View
style={{
borderRadius: 100,
borderWidth: 1,
borderColor: "#e6e6e6",
paddingHorizontal: 16,
}}
>
<Text>{Bech32Address.shortenAddress(address, maxCharacters)}</Text>
</View>
);
};
1 change: 1 addition & 0 deletions packages/mobile/src/components/buttons/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./white-button";
52 changes: 52 additions & 0 deletions packages/mobile/src/components/buttons/white-button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React, { FunctionComponent } from "react";
import { StyleProp, TextStyle, ViewStyle } from "react-native";
import { Button, useTheme } from "react-native-elements";

type WhiteButtonProps = {
containerStyle?: StyleProp<ViewStyle>;
buttonStyle?: StyleProp<ViewStyle>;
titleStyle?: StyleProp<TextStyle>;
disabled?: boolean;
loading?: boolean;
title: string;
onPress: () => void;
};

export const WhiteButton: FunctionComponent<WhiteButtonProps> = ({
containerStyle,
buttonStyle,
titleStyle,
title,
disabled,
loading,
onPress,
}) => {
const { theme } = useTheme();

return (
<Button
containerStyle={{
flex: 1,
...(containerStyle as Record<string, unknown>),
}}
buttonStyle={{
borderWidth: 1,
borderColor: theme.colors?.primary,
borderRadius: 5,
backgroundColor: theme.colors?.white,
paddingVertical: 10,
paddingHorizontal: 20,
...(buttonStyle as Record<string, unknown>),
}}
titleStyle={{
color: theme.colors?.primary,
fontWeight: "500",
...(titleStyle as Record<string, unknown>),
}}
title={title}
onPress={onPress}
loading={loading}
disabled={disabled}
/>
);
};
1 change: 1 addition & 0 deletions packages/mobile/src/components/page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const Page: FunctionComponent = ({ children }) => {
<ScrollView
style={{
flex: 1,
backgroundColor: "#fff",
}}
>
<View style={{ padding: 10 }}>{children}</View>
Expand Down
Loading

0 comments on commit b6449bb

Please sign in to comment.