Context for rendering
Container element: bubble, modal, shield, or splitView
Object with form data and clicked button value
Container Requirements:
Resolution:
const {data, button} = await showUI(ctx, bubble([
headerBar({title: 'User Information'}),
group([
inputField({name: 'firstName', label: 'First name'}),
currencyField({name: 'salary', label: 'Salary', currency: 'dollar'}),
select({
name: 'country',
items: [{value: 'us', label: 'US'}, {value: 'de', label: 'DE'}]
})
]),
navigationBar({
buttons: [
{text: 'Cancel', value: 'cancel'},
{text: 'Submit', value: 'submit'}
]
})
]));
// data: {firstName: "Mark", salary: "5000", country: "us"}
// button: "submit" or "cancel"
Shows a dynamically generated UI.