Skip to content

Commit

Permalink
Merge pull request #131 from bitsongofficial/NikitaZheleznov/0.0.0-ed…
Browse files Browse the repository at this point in the history
…it_contact

fix: ✨ upd. EditContactFooter
  • Loading branch information
EnricoBarbieri1997 authored Sep 13, 2022
2 parents de81708 + 45ca16c commit e3ed1ca
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions modals/profile/components/organisms/EditContact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Button, ButtonBack, Icon2 } from "components/atoms"
import { StyledInput, Title } from "../atoms"
import { ButtonAvatar } from "../moleculs"
import { Contact } from "stores/ContactsStore"
import { useSafeAreaInsets } from "react-native-safe-area-context"

export class Controller {
steps = new Steps(["Data", "Photo"])
Expand Down Expand Up @@ -84,29 +85,32 @@ type FooterProps = {
onPressDone(): void
}

export const Footer = observer(({ steps, onPressBack, onPressDone, onPressNext }: FooterProps) => (
<View style={styles.footer}>
<View style={styles.buttons}>
<ButtonBack onPress={onPressBack} />

{steps.title === "Data" ? (
<Button
text="Continue"
onPress={onPressNext}
textStyle={styles.buttonText}
contentContainerStyle={styles.buttonContent}
/>
) : (
<Button
onPress={onPressDone}
text="Save"
textStyle={styles.buttonText}
contentContainerStyle={styles.buttonContent}
/>
)}
export const Footer = observer(({ steps, onPressBack, onPressDone, onPressNext }: FooterProps) => {
const insets = useSafeAreaInsets()
return (
<View style={[styles.footer, { paddingBottom: insets.bottom + 8 }]}>
<View style={styles.buttons}>
<ButtonBack onPress={onPressBack} />

{steps.title === "Data" ? (
<Button
text="Continue"
onPress={onPressNext}
textStyle={styles.buttonText}
contentContainerStyle={styles.buttonContent}
/>
) : (
<Button
onPress={onPressDone}
text="Save"
textStyle={styles.buttonText}
contentContainerStyle={styles.buttonContent}
/>
)}
</View>
</View>
</View>
))
)
})

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -138,10 +142,8 @@ const styles = StyleSheet.create({
// ------ Footer ----------

footer: {
flexGrow: 1,
justifyContent: "flex-end",
marginHorizontal: 26,
marginBottom: 8,
},

button_qr: {
Expand Down

0 comments on commit e3ed1ca

Please sign in to comment.