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