@cantonjs/react-scroll-view
Version:
react scroll component using intersection observer API
37 lines (32 loc) • 907 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _Style = require('../Style');
exports.default = (0, _Style.create)({
container: function container(style) {
return _extends({
position: 'relative'
}, style);
},
topHook: {
position: 'absolute',
top: 0
},
bottomHook: function bottomHook() {
var bottom = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return {
position: 'absolute',
bottom: bottom,
top: 0,
left: 0,
right: 0,
zIndex: -666
// boxShadow: '0 0 0 2px red',
};
},
sticky: function sticky(zIndex) {
return { zIndex: zIndex };
}
});
;