Skip to content

Commit

Permalink
Make number selectable and created SelectableArkadTact object
Browse files Browse the repository at this point in the history
  • Loading branch information
Stronkness committed Nov 10, 2023
1 parent 535de13 commit d89ba77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion components/StyledText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { StyleSheet, TextStyle } from "react-native";
import Colors from "constants/Colors";

export function DefaultText(props: TextProps) {
return <Text {...props} style={[props.style, { fontFamily: "main-font-bold" }]} />;
return (
<Text {...props} style={[props.style, { fontFamily: "main-font-bold" }]} />
);
}

interface textProps {
Expand All @@ -16,6 +18,13 @@ interface textProps {
export function ArkadText(props: textProps) {
return <Text style={[styles.text, props.style]}>{props.text}</Text>;
}
export function SelectableArkadText(props: textProps) {
return (
<Text style={[styles.text, props.style]} selectable>
{props.text}
</Text>
);
}
export function NoButton(props: textProps) {
return <Text style={[styles.acceptedText, props.style]}>{props.text}</Text>;
}
Expand Down
4 changes: 2 additions & 2 deletions components/profileScreen/ContactsPG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect } from "react";
import { View, Text } from "../Themed";
import Colors from "constants/Colors";
import { ScrollView, StyleSheet } from "react-native";
import { ArkadText } from "components/StyledText";
import { ArkadText, SelectableArkadText } from "components/StyledText";
import { API } from "api/API";
import { Contact } from "api/Contacts";

Expand All @@ -29,7 +29,7 @@ export default function Contacts() {
style={styles.text}
/>
<ArkadText text={contact.email} style={styles.text} />
<ArkadText text={contact.phoneNumber} style={styles.text} />
<SelectableArkadText text={contact.phoneNumber} style={styles.text} />
</View>
))}
<ArkadText
Expand Down

0 comments on commit d89ba77

Please sign in to comment.