react-bootstrap
Version:
Bootstrap 3 components build with React
23 lines (19 loc) • 615 B
JavaScript
var React = require('react');
var joinClasses = require('./utils/joinClasses');
var AffixMixin = require('./AffixMixin');
var domUtils = require('./utils/domUtils');
var Affix = React.createClass({displayName: "Affix",
statics: {
domUtils: domUtils
},
mixins: [AffixMixin],
render: function () {
var holderStyle = {top: this.state.affixPositionTop};
return (
React.createElement("div", React.__spread({}, this.props, {className: joinClasses(this.props.className, this.state.affixClass), style: holderStyle}),
this.props.children
)
);
}
});
module.exports = Affix;