pages/index.js Add the title bar
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 { EmptyState, Layout, Page } from '@shopify/polaris'; | |
import { TitleBar } from '@shopify/app-bridge-react'; | |
const img = 'https://cdn.shopify.com/s/files/1/0757/9955/files/empty-state.svg'; | |
const Index = () => ( | |
<Page> | |
<TitleBar | |
title="Sample App" | |
primaryAction={{ | |
content: 'Select products', | |
}} | |
/> | |
<Layout> | |
<EmptyState | |
heading="Discount your products temporarily" | |
action={{ | |
content: 'Select products', | |
onAction: () => console.log('clicked'), | |
}} | |
image={img} | |
> | |
<p>Select products to change their price temporarily.</p> | |
</EmptyState> | |
</Layout> | |
</Page> | |
); | |
export default Index; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment