react-with-breakpoints
Version:
Utility React component for altering the visual experience of responsive and lean webpages.
19 lines • 539 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils");
// @ts-ignore
exports.ShowAt = function (_a) {
var breakpoint = _a.breakpoint, children = _a.children;
var shouldRender = utils_1.useBreakpoint(breakpoint, false);
if (shouldRender) {
return children;
}
return null;
};
exports.ShowAt.displayName = 'ShowAt';
exports.ShowAt.defaultProps = {
breakpoint: '',
children: null
};
exports.default = exports.ShowAt;
//# sourceMappingURL=ShowAt.js.map