Skip to content

Commit

Permalink
umdWrapper updated to new API
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleNeedham committed Nov 19, 2019
1 parent cd3d0a6 commit e72994e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/umdWrapper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { CssBaseline } from "@material-ui/core";
import { createMuiTheme } from "@material-ui/core/styles";
import { ThemeProvider } from "@material-ui/styles";
import React from "react";
import ReactDOM from "react-dom";
import EmbedWrapper from "./EmbedWrapper";
import { theme as muiTheme } from "./utils/theme";
import { default as muiTheme } from "./utils/theme";

const renderProducts = ({
theme,
Expand All @@ -12,9 +13,9 @@ const renderProducts = ({
productsLimit,
filters,
cta,
provider,
onMoreDetails,
onApply,
onFilter,
}) => {
const element = document.querySelector(selector);

Expand All @@ -26,14 +27,15 @@ const renderProducts = ({

ReactDOM.render(
<ThemeProvider theme={theme ? createMuiTheme(theme) : muiTheme}>
<CssBaseline />
<EmbedWrapper
products={products}
productsLimit={productsLimit}
filters={filters}
cta={cta}
provider={provider}
onMoreDetails={onMoreDetails}
onApply={onApply}
onFilter={onFilter}
/>
</ThemeProvider>,
element
Expand Down

0 comments on commit e72994e

Please sign in to comment.