-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(setup-wallet): info illustration (#3227)
- Loading branch information
Showing
5 changed files
with
56 additions
and
34 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {action} from '@storybook/addon-actions' | ||
import {storiesOf} from '@storybook/react-native' | ||
import React from 'react' | ||
import {StyleSheet, View} from 'react-native' | ||
|
||
import {Info} from './Info' | ||
|
||
storiesOf('AddWallet Info Symbol', module) | ||
.addDecorator((story) => <View style={styles.container}>{story()}</View>) | ||
.add('with icon', () => <Info paddingTop={3} onPress={() => action('info pressed')} />) | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: 'yellow', | ||
}, | ||
}) |
28 changes: 28 additions & 0 deletions
28
apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as React from 'react' | ||
import {StyleSheet} from 'react-native' | ||
import {TouchableOpacity} from 'react-native-gesture-handler' | ||
|
||
import {Spacer} from '../../../../components' | ||
import {Info as InfoIcon} from '../../illustrations/Info' | ||
|
||
export const Info = ({onPress, paddingTop}: {onPress: () => void; paddingTop?: number}) => { | ||
const {styles} = useStyles() | ||
|
||
return ( | ||
<TouchableOpacity style={styles.info} onPress={onPress}> | ||
{paddingTop !== undefined && <Spacer height={paddingTop} />} | ||
|
||
<InfoIcon size={24} /> | ||
</TouchableOpacity> | ||
) | ||
} | ||
|
||
const useStyles = () => { | ||
const styles = StyleSheet.create({ | ||
info: { | ||
height: 24, | ||
}, | ||
}) | ||
|
||
return {styles} as const | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters