UNPKG

react-inline-block

Version:

InlineBlock component for React (style.display == "inline-block")

18 lines (13 loc) 381 B
import React from 'react'; import assign from 'object-assign'; const inlineBlockStyle = { display: 'inline-block' }; class ReactInlineBlock extends React.Component { render() { const style = assign({}, this.props.style, inlineBlockStyle); const props = assign({}, this.props, { style: style }); return <div {...props} />; } } export default ReactInlineBlock;