Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
added LoadingContainer to ui-tests for react context api
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanJCasey committed Aug 24, 2019
1 parent cf3a3e9 commit 31fe5d9
Show file tree
Hide file tree
Showing 2 changed files with 280 additions and 277 deletions.
13 changes: 12 additions & 1 deletion ui-tests/react-context/src/App.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
import React, { Component } from "react";
import { Drizzle } from '@drizzle/store';
import { DrizzleContext } from "@drizzle/react-plugin";
import { newContextComponents } from "@drizzle/react-components";

import "./App.css";

import drizzleOptions from "./drizzleOptions";
import MyComponent from "./MyComponent";

const drizzle = new Drizzle(drizzleOptions);
const { LoadingContainer } = newContextComponents;

class App extends Component {
render() {
return (
<DrizzleContext.Provider drizzle={drizzle}>
<MyComponent />
<DrizzleContext.Consumer>
{drizzleContext =>
<LoadingContainer drizzleState={drizzleContext.drizzleState}>
<MyComponent
drizzle={drizzleContext.drizzle}
drizzleState={drizzleContext.drizzleState}
/>
</LoadingContainer>
}
</DrizzleContext.Consumer>
</DrizzleContext.Provider>
);
}
Expand Down
Loading

0 comments on commit 31fe5d9

Please sign in to comment.