File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
src/components/PolarisExampleWrapper Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' polaris.shopify.com ' : patch
3+ ---
4+
5+ Added global styles from deps instead of linking unpkg
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Script from 'next/script';
44import { useEffect } from 'react' ;
55import { useRouter } from 'next/router' ;
66import useDarkMode from 'use-dark-mode' ;
7+ import '@shopify/polaris/build/esm/styles.css' ;
78
89import { className } from '../src/utils/various' ;
910import Frame from '../src/components/Frame' ;
Original file line number Diff line number Diff line change @@ -3,14 +3,10 @@ import translations from '@shopify/polaris/locales/en.json';
33import { ComponentType } from 'react' ;
44import styles from './PolarisExampleWrapper.module.scss' ;
55
6- const stylesheetHref =
7- 'https://unpkg.com/@shopify/polaris@latest/build/esm/styles.css' ;
8-
96export const withPolarisExample = ( Component : ComponentType ) => {
107 const PolarisHOC = ( props : any ) => {
118 return (
129 < >
13- < link rel = "stylesheet" href = { stylesheetHref } />
1410 < AppProvider i18n = { translations } >
1511 < div className = { styles . Container } >
1612 < div id = "polaris-example" className = { styles . Example } >
You can’t perform that action at this time.
0 commit comments