Skip to content

Commit

Permalink
chore: add polaris-shopify-com-version to root
Browse files Browse the repository at this point in the history
  • Loading branch information
kyledurand committed Oct 31, 2024
1 parent a0238fe commit 6c70d28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion polaris.shopify.com/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {useEffect, StrictMode} from 'react';
import {useRouter} from 'next/router';
import useDarkMode from 'use-dark-mode';
import '@shopify/polaris/build/esm/styles.css';
import pkg from '../package.json';

import {className} from '../src/utils/various';
import Frame from '../src/components/Frame';
Expand Down Expand Up @@ -102,7 +103,12 @@ function MyApp({Component, pageProps}: AppProps) {
</Head>

<div
style={{background: isPolarisExample ? '#fafafa' : 'unset'}}
style={
{
background: isPolarisExample ? '#fafafa' : 'unset',
'--polaris-shopify-com-version': pkg.version,
} as React.CSSProperties
}
className={className(
!isPolarisExample && 'styles-for-site-but-not-polaris-examples',
)}
Expand Down

0 comments on commit 6c70d28

Please sign in to comment.