Created
August 26, 2019 15:37
-
-
Save hannachen/b1b47c3f6533a0ecd97e65648b8aab3f to your computer and use it in GitHub Desktop.
App Bridge Title Bar: Create
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TitleBar} from ‘@shopify/app-bridge/actions’; | |
// Create buttons | |
const saveButton = Button.create(app, { label: 'Save' }); | |
const cancelButton = Button.create(app, { label: 'Cancel' }); | |
// Setup title bar options | |
const titleBarOptions = { | |
title: 'My page title', | |
buttons: { | |
primary: saveButton, | |
secondary: [cancelButton], | |
}, | |
}; | |
// Create title bar | |
const myTitleBar = TitleBar.create(app, titleBarOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment