Improved mascot popup buttons layout

This commit is contained in:
Arnaud Vergnet 2020-07-14 18:51:00 +02:00
parent f675bda780
commit 460d84c5f4

View file

@ -173,26 +173,17 @@ class MascotPopup extends React.Component<Props, State> {
const cancel = this.props.buttons.cancel;
return (
<View style={{
flexDirection: "row",
marginLeft: "auto",
marginRight: "auto",
marginTop: "auto",
marginBottom: "auto",
}}>
{cancel != null
? <Button
mode={"contained"}
icon={cancel.icon}
color={cancel.color}
onPress={cancel.onPress}
>
{cancel.message}
</Button>
: null}
{action != null
? <Button
style={{
marginLeft: 20,
marginLeft: 'auto',
marginRight: 'auto',
marginBottom: 10,
}}
mode={"contained"}
icon={action.icon}
@ -202,6 +193,20 @@ class MascotPopup extends React.Component<Props, State> {
{action.message}
</Button>
: null}
{cancel != null
? <Button
style={{
marginLeft: 'auto',
marginRight: 'auto',
}}
mode={"contained"}
icon={cancel.icon}
color={cancel.color}
onPress={cancel.onPress}
>
{cancel.message}
</Button>
: null}
</View>
);
}