diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/NoteView.js | 2 | ||||
| -rw-r--r-- | components/NotesList.js | 6 | ||||
| -rw-r--r-- | components/Options.js | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/components/NoteView.js b/components/NoteView.js index 820eaf9..762ac2b 100644 --- a/components/NoteView.js +++ b/components/NoteView.js @@ -53,7 +53,7 @@ export default class NoteView extends React.Component { if (!nk) notesKeys = [0]; else notesKeys = JSON.parse(nk); const key = this.state.isNew ? Math.max(...notesKeys) + 1 : this.state.note.key; const date = Date.now(); - const colors = ["darkred", "darkblue", "darkcyan", "darkgreen"] + const colors = ["#49d96c", "#f5ac58", "pink", "darkcyan"] const color = this.state.isNew ? colors[Math.floor(Math.random() * colors.length)] : this.state.note.color if (this.state.isNew) notesKeys.push(key); diff --git a/components/NotesList.js b/components/NotesList.js index 9525b11..2075da4 100644 --- a/components/NotesList.js +++ b/components/NotesList.js @@ -89,7 +89,7 @@ export default class NotesList extends React.Component { keyExtractor={(_, i) => i.toString()} contentContainerStyle={styles.list} style={styles.list} - numColumns={2} + numColumns={1} /> </View> </View> @@ -123,8 +123,8 @@ const styles = StyleSheet.create({ backgroundColor: "black", }, note: { - width: 160, - height: 160, + width: 350, + height: 200, backgroundColor: "red", borderRadius: 10, padding: 10, diff --git a/components/Options.js b/components/Options.js index fd0c21c..8138133 100644 --- a/components/Options.js +++ b/components/Options.js @@ -4,14 +4,14 @@ import * as SecureStore from 'expo-secure-store'; let a = true export default function CategoryView(props) { - let [font, setFont] = React.useState(0) + let [font, setFont] = React.useState(22) async function setFontSS(f) { setFont(f); await SecureStore.setItemAsync('font', f.toString()) } - React.useEffect(() => getFont(setFont), []) + React.useEffect(() => { getFont(setFont) }, []) if (a) { props.navigation.addListener('focus', () => getFont(setFont)) a = false @@ -19,10 +19,10 @@ export default function CategoryView(props) { return ( <SafeAreaView style={styles.cont}> - <Text style={styles.txt}>Selected font: {font}</Text> - <TouchableOpacity onPress={() => setFontSS(12)}><Text style={[styles.txt, styles.btn]}>Font 12</Text></TouchableOpacity> - <TouchableOpacity onPress={() => setFontSS(19)}><Text style={[styles.txt, styles.btn]}>Font 19</Text></TouchableOpacity > - <TouchableOpacity onPress={() => setFontSS(26)}><Text style={[styles.txt, styles.btn]}>Font 26</Text></TouchableOpacity > + <Text style={[styles.txt, { fontSize: font < 12 ? 19 : font }]}>Selected font: {font}</Text> + <TouchableOpacity onPress={() => setFontSS(12)}><Text style={[styles.txt, styles.btn, { fontSize: 12 }]}>Font 12</Text></TouchableOpacity> + <TouchableOpacity onPress={() => setFontSS(19)}><Text style={[styles.txt, styles.btn, { fontSize: 19 }]}>Font 19</Text></TouchableOpacity > + <TouchableOpacity onPress={() => setFontSS(26)}><Text style={[styles.txt, styles.btn, { fontSize: 26 }]}>Font 26</Text></TouchableOpacity > </SafeAreaView > ) } |
