Sha256: bc94865e37a3fcdaa5431f8c486c7b1bedc86d8b659682a43c3d719471c69431

Contents?: true

Size: 588 Bytes

Versions: 1

Compression:

Stored size: 588 Bytes

Contents

import '@shopify/polaris/esnext/styles/global.scss';
import React from 'react';
import {Link} from '@shopify/react-router';
import {AppProvider} from '@shopify/polaris';
import {useI18n} from '@shopify/react-i18n';

interface Props {
  children?: React.ReactNode;
}

export function Polaris({children}: Props) {
  const [i18n] = useI18n({
    id: 'Polaris',
    translations: async (code) => {
      return import(`@shopify/polaris/locales/${code}.json`);
    },
  });

  return (
    <AppProvider i18n={i18n.translations} linkComponent={Link}>
      {children}
    </AppProvider>
  );
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quilt_rails-3.1.0 lib/generators/quilt/demo_app/templates/app-ui/foundation/Polaris.tsx