Skip to content

Instantly share code, notes, and snippets.

@nutterbrand
Created January 3, 2021 04:08
Show Gist options
  • Save nutterbrand/5d6a74b648ee193c50c4bdb0b16cbc9d to your computer and use it in GitHub Desktop.
Save nutterbrand/5d6a74b648ee193c50c4bdb0b16cbc9d to your computer and use it in GitHub Desktop.
pages/index.js Add the title bar
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