UNPKG

react-bootstrap

Version:

Bootstrap 3 components build with React

27 lines (21 loc) 534 B
import React from 'react'; import classNames from 'classnames'; import AffixMixin from './AffixMixin'; import domUtils from './utils/domUtils'; const Affix = React.createClass({ statics: { domUtils }, mixins: [AffixMixin], render() { let holderStyle = {top: this.state.affixPositionTop}; return ( <div {...this.props} className={classNames(this.props.className, this.state.affixClass)} style={holderStyle}> {this.props.children} </div> ); } }); export default Affix;