feat:iOS support toast gravity
This commit is contained in:
@@ -14,7 +14,7 @@ class ModalDemo extends Panel {
|
||||
textAlignment: Gravity.Center,
|
||||
height: 50,
|
||||
}),
|
||||
label('toast'),
|
||||
label('toast on bottom'),
|
||||
label('Click me').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
@@ -26,6 +26,31 @@ class ModalDemo extends Panel {
|
||||
modal(context).toast('This is a toast.')
|
||||
}
|
||||
} as IText),
|
||||
label('toast on top'),
|
||||
label('Click me').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
bgColor: colors[0],
|
||||
textSize: 30,
|
||||
textColor: Color.WHITE,
|
||||
layoutConfig: layoutConfig().exactly(),
|
||||
onClick: () => {
|
||||
modal(context).toast('This is a toast.', Gravity.Top)
|
||||
}
|
||||
} as IText),
|
||||
|
||||
label('toast on center'),
|
||||
label('Click me').apply({
|
||||
width: 200,
|
||||
height: 50,
|
||||
bgColor: colors[0],
|
||||
textSize: 30,
|
||||
textColor: Color.WHITE,
|
||||
layoutConfig: layoutConfig().exactly(),
|
||||
onClick: () => {
|
||||
modal(context).toast('This is a toast.', Gravity.Center)
|
||||
}
|
||||
} as IText),
|
||||
]).apply({
|
||||
layoutConfig: layoutConfig().atmost().h(LayoutSpec.WRAP_CONTENT),
|
||||
gravity: Gravity.Center,
|
||||
|
Reference in New Issue
Block a user