forked from vergnet/application-amicale
Improved mascot popup buttons layout
This commit is contained in:
parent
f675bda780
commit
460d84c5f4
1 changed files with 17 additions and 12 deletions
|
@ -173,26 +173,17 @@ class MascotPopup extends React.Component<Props, State> {
|
||||||
const cancel = this.props.buttons.cancel;
|
const cancel = this.props.buttons.cancel;
|
||||||
return (
|
return (
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: "row",
|
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "auto",
|
marginRight: "auto",
|
||||||
marginTop: "auto",
|
marginTop: "auto",
|
||||||
marginBottom: "auto",
|
marginBottom: "auto",
|
||||||
}}>
|
}}>
|
||||||
{cancel != null
|
|
||||||
? <Button
|
|
||||||
mode={"contained"}
|
|
||||||
icon={cancel.icon}
|
|
||||||
color={cancel.color}
|
|
||||||
onPress={cancel.onPress}
|
|
||||||
>
|
|
||||||
{cancel.message}
|
|
||||||
</Button>
|
|
||||||
: null}
|
|
||||||
{action != null
|
{action != null
|
||||||
? <Button
|
? <Button
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 20,
|
marginLeft: 'auto',
|
||||||
|
marginRight: 'auto',
|
||||||
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
mode={"contained"}
|
mode={"contained"}
|
||||||
icon={action.icon}
|
icon={action.icon}
|
||||||
|
@ -202,6 +193,20 @@ class MascotPopup extends React.Component<Props, State> {
|
||||||
{action.message}
|
{action.message}
|
||||||
</Button>
|
</Button>
|
||||||
: null}
|
: 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>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue