Bottom align save button on set form
This commit is contained in:
parent
780500ac75
commit
228383ed23
|
@ -90,7 +90,7 @@ export default function EditSet() {
|
|||
);
|
||||
|
||||
return (
|
||||
<View style={{padding: PADDING}}>
|
||||
<View style={{padding: PADDING, flex: 1}}>
|
||||
<SetForm save={save} set={set} />
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, {useCallback, useContext, useRef, useState} from 'react';
|
||||
import {TextInput} from 'react-native';
|
||||
import {TextInput, View} from 'react-native';
|
||||
import DocumentPicker from 'react-native-document-picker';
|
||||
import {Button, Card, TouchableRipple} from 'react-native-paper';
|
||||
import ConfirmDialog from './ConfirmDialog';
|
||||
|
@ -13,11 +13,9 @@ import {useSettings} from './use-settings';
|
|||
export default function SetForm({
|
||||
save,
|
||||
set,
|
||||
next,
|
||||
}: {
|
||||
set: Set;
|
||||
save: (set: Set) => void;
|
||||
next?: () => void;
|
||||
}) {
|
||||
const [name, setName] = useState(set.name);
|
||||
const [reps, setReps] = useState(set.reps.toString());
|
||||
|
@ -86,6 +84,7 @@ export default function SetForm({
|
|||
|
||||
return (
|
||||
<>
|
||||
<View style={{flex: 1}}>
|
||||
<MassiveInput
|
||||
label="Name"
|
||||
value={name}
|
||||
|
@ -138,7 +137,7 @@ export default function SetForm({
|
|||
Image
|
||||
</Button>
|
||||
)}
|
||||
{next && <Button icon="navigate-next">Next</Button>}
|
||||
</View>
|
||||
<Button
|
||||
disabled={!name}
|
||||
mode="contained"
|
||||
|
|
Loading…
Reference in New Issue
Block a user