Skip to content

Instantly share code, notes, and snippets.

@nutterbrand
Created January 3, 2021 04:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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