Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

[WIP] fix: set default numberOfLines prop to 1 in HeaderTitle #294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ Array [
}
>
<Text
numberOfLines={1}
onLayout={[Function]}
style={
Array [
Expand Down Expand Up @@ -593,6 +594,7 @@ Array [
}
>
<Text
numberOfLines={1}
onLayout={[Function]}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ Array [
}
>
<Text
numberOfLines={1}
onLayout={[Function]}
style={
Array [
Expand Down Expand Up @@ -627,6 +628,7 @@ Array [
}
>
<Text
numberOfLines={1}
onLayout={[Function]}
style={
Array [
Expand Down
4 changes: 3 additions & 1 deletion src/views/Header/HeaderTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ type Props = TextProps & {
};

export default function HeaderTitle({ style, ...rest }: Props) {
return <Animated.Text {...rest} style={[styles.title, style]} />;
return (
<Animated.Text numberOfLines={1} {...rest} style={[styles.title, style]} />
);
}

const styles = StyleSheet.create({
Expand Down