14
app/components/FloatGrid/Ready.js
Executable file
14
app/components/FloatGrid/Ready.js
Executable file
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FloatGridContext } from './floatGridContext';
|
||||
|
||||
export const Ready = ({ children }) => (
|
||||
<FloatGridContext.Consumer>
|
||||
{
|
||||
({ gridReady }) => gridReady ? children : null
|
||||
}
|
||||
</FloatGridContext.Consumer>
|
||||
);
|
||||
Ready.propTypes = {
|
||||
children: PropTypes.node
|
||||
}
|
Reference in New Issue
Block a user