Skip to content

Instantly share code, notes, and snippets.

@RAAbbott
Created August 27, 2021 21:08
Show Gist options
  • Save RAAbbott/3f2be1e8d9cd2f377dcfcf604f84fc7d to your computer and use it in GitHub Desktop.
Save RAAbbott/3f2be1e8d9cd2f377dcfcf604f84fc7d to your computer and use it in GitHub Desktop.
Code for "Build A Shopify App - Part 1 (Polaris)"
import {
Page,
Layout,
Card,
Tag,
Stack,
TextField,
Button,
} from "@shopify/polaris";
const Index = () => {
return (
<Page title="Product Tags">
<Layout>
<Layout.Section oneHalf>
<Card title="Product Name">
<Card.Section>
<Stack>
<Tag onRemove={() => console.log("hello")}>test</Tag>
<Tag onRemove={() => console.log("hello")}>test</Tag>
</Stack>
</Card.Section>
<Card.Section>
<Stack distribution="equalSpacing">
<TextField />
<Button primary>Add Tag</Button>
</Stack>
</Card.Section>
</Card>
</Layout.Section>
<Layout.Section oneHalf>
<Card title="Product Name">
<Card.Section>
<Stack>
<Tag onRemove={() => console.log("hello")}>test</Tag>
<Tag onRemove={() => console.log("hello")}>test</Tag>
</Stack>
</Card.Section>
<Card.Section>
<Stack distribution="equalSpacing">
<TextField />
<Button primary>Add Tag</Button>
</Stack>
</Card.Section>
</Card>
</Layout.Section>
</Layout>
</Page>
);
};
export default Index;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment