-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create initial modal component * add reusable Separator component
- Loading branch information
Showing
10 changed files
with
153 additions
and
95 deletions.
There are no files selected for viewing
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,39 @@ | ||
import MyModal from '@modal' | ||
import { ThemeContext } from '@src/context/Theme' | ||
import { globals } from '@styles' | ||
import { useContext } from 'react' | ||
import { StyleSheet, Text, TouchableOpacity } from 'react-native' | ||
|
||
import Button from './Button' | ||
|
||
interface IInitialModalProps { | ||
visible: boolean | ||
onConfirm: () => void | ||
onCancel: () => void | ||
} | ||
|
||
export default function InitialModal({ visible, onConfirm, onCancel }: IInitialModalProps) { | ||
const { color, highlight } = useContext(ThemeContext) | ||
return ( | ||
<MyModal type='bottom' animation='slide' visible={visible}> | ||
<Text style={globals(color, highlight).modalHeader}> | ||
Get started | ||
</Text> | ||
<Text style={globals(color, highlight).modalTxt}> | ||
You should add a mint that you trust before sending or receiving tokens. | ||
</Text> | ||
<Button txt='Add a mint now' onPress={onConfirm} /> | ||
<TouchableOpacity onPress={onCancel}> | ||
<Text style={[globals(color, highlight).pressTxt, styles.cancel]}> | ||
Will do later | ||
</Text> | ||
</TouchableOpacity> | ||
</MyModal> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
cancel: { | ||
marginTop: 25, | ||
}, | ||
}) |
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,14 @@ | ||
import { ThemeContext } from '@src/context/Theme' | ||
import { useContext } from 'react' | ||
import { type StyleProp, StyleSheet, type TextStyle, View } from 'react-native' | ||
|
||
export default function Separator({ style }: { style?: StyleProp<TextStyle>[] }) { | ||
const { color } = useContext(ThemeContext) | ||
return <View style={[styles.separator, { borderColor: color.BORDER }, ...(style || [])]} /> | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
separator: { | ||
borderBottomWidth: 1 | ||
} | ||
}) |
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
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
Oops, something went wrong.