From 0ab6ae663ea280149cd5bfe93d77d86853a8e0de Mon Sep 17 00:00:00 2001 From: Kyle Durand Date: Mon, 7 Nov 2022 12:26:04 -0500 Subject: [PATCH] Use global styles --- .changeset/wise-rockets-pump.md | 5 +++++ polaris.shopify.com/pages/_app.tsx | 1 + .../PolarisExampleWrapper/PolarisExampleWrapper.tsx | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changeset/wise-rockets-pump.md diff --git a/.changeset/wise-rockets-pump.md b/.changeset/wise-rockets-pump.md new file mode 100644 index 00000000000..fece586f887 --- /dev/null +++ b/.changeset/wise-rockets-pump.md @@ -0,0 +1,5 @@ +--- +'polaris.shopify.com': patch +--- + +Added global styles from deps instead of linking unpkg diff --git a/polaris.shopify.com/pages/_app.tsx b/polaris.shopify.com/pages/_app.tsx index 481d191fbf2..b3e34be9754 100644 --- a/polaris.shopify.com/pages/_app.tsx +++ b/polaris.shopify.com/pages/_app.tsx @@ -4,6 +4,7 @@ import Script from 'next/script'; import {useEffect} from 'react'; import {useRouter} from 'next/router'; import useDarkMode from 'use-dark-mode'; +import '@shopify/polaris/build/esm/styles.css'; import {className} from '../src/utils/various'; import Frame from '../src/components/Frame'; diff --git a/polaris.shopify.com/src/components/PolarisExampleWrapper/PolarisExampleWrapper.tsx b/polaris.shopify.com/src/components/PolarisExampleWrapper/PolarisExampleWrapper.tsx index 51c990fd4c1..5853bdf0e1c 100644 --- a/polaris.shopify.com/src/components/PolarisExampleWrapper/PolarisExampleWrapper.tsx +++ b/polaris.shopify.com/src/components/PolarisExampleWrapper/PolarisExampleWrapper.tsx @@ -3,14 +3,10 @@ import translations from '@shopify/polaris/locales/en.json'; import {ComponentType} from 'react'; import styles from './PolarisExampleWrapper.module.scss'; -const stylesheetHref = - 'https://unpkg.com/@shopify/polaris@latest/build/esm/styles.css'; - export const withPolarisExample = (Component: ComponentType) => { const PolarisHOC = (props: any) => { return ( <> -