Skip to content

Commit

Permalink
feat: Add title to HathorList and refactor Settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
alexruzenhack committed Oct 5, 2023
1 parent ea5ecd8 commit f6572ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/components/HathorList.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ export class HathorList extends Component {
shadowColor: COLORS.textColor,
shadowOpacity: 0.08,
},
title: {
alignSelf: 'flex-start',
paddingHorizontal: 32,
fontSize: 14,
// HSL is preferable than RGB because it allows an
// easier manipulation in arithmetic fashion.
// The following color is Black with 55% of light,
// which yields a tone of grey.
color: 'hsl(0, 0%, 55%)',
},
infinityView: {
flex: 1,
marginBottom: 0,
Expand All @@ -48,9 +58,13 @@ export class HathorList extends Component {
}

return (
<>
{this.props.title
&& <Text style={[this.style.title]}>{this.props.title}</Text>}
<View style={style}>
{this.props.children}
</View>
</>
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/screens/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Settings extends React.Component {
)
)}

<HathorList infinity>
<HathorList title={t`General Settings`}>
<ListItem
text={(
<View style={{ flex: 1 }}>
Expand Down Expand Up @@ -169,6 +169,7 @@ export class Settings extends React.Component {
)}
/>
</HathorList>

</ScrollView>
<OfflineBar />
</View>
Expand Down

0 comments on commit f6572ee

Please sign in to comment.