react-stick
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -139,3 +139,3 @@ "use strict"; | ||
value: nestingKey | ||
}, _react.default.createElement(Component, rest, children)); | ||
}, _react.default.createElement(Component, _extends({}, resolvedStyle, rest), children)); | ||
} | ||
@@ -149,2 +149,3 @@ | ||
align: resolvedAlign, | ||
style: resolvedStyle, | ||
node: _react.default.createElement(_StickNode.default, { | ||
@@ -151,0 +152,0 @@ width: width, |
@@ -25,3 +25,5 @@ "use strict"; | ||
nestingKey = _ref.nestingKey, | ||
rest = _objectWithoutPropertiesLoose(_ref, ["node", "children", "style", "component", "containerRef", "nestingKey"]); | ||
align = _ref.align, | ||
position = _ref.position, | ||
rest = _objectWithoutPropertiesLoose(_ref, ["node", "children", "style", "component", "containerRef", "nestingKey", "align", "position"]); | ||
@@ -28,0 +30,0 @@ var Component = component || 'div'; |
{ | ||
"name": "react-stick", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "React component to stick a portaled node to an anchor node", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -77,2 +77,3 @@ // @flow | ||
component: ?string, | ||
style: Substyle, | ||
@@ -98,4 +99,2 @@ nestingKey: string, | ||
style: Substyle, | ||
updateOnAnimationFrame: boolean, | ||
@@ -102,0 +101,0 @@ |
@@ -140,3 +140,5 @@ // @flow | ||
<StickContext.Provider value={nestingKey}> | ||
<Component {...rest}>{children}</Component> | ||
<Component {...resolvedStyle} {...rest}> | ||
{children} | ||
</Component> | ||
</StickContext.Provider> | ||
@@ -153,2 +155,3 @@ ) | ||
align={resolvedAlign} | ||
style={resolvedStyle} | ||
node={ | ||
@@ -155,0 +158,0 @@ <StickNode |
// @flow | ||
import React from 'react' | ||
import { type HOC } from 'recompose' | ||
import { type Substyle, defaultStyle } from 'substyle' | ||
import { defaultStyle } from 'substyle' | ||
@@ -9,8 +9,2 @@ import { type StickInlinePropsT } from './flowTypes' | ||
type PropsT = {| | ||
...StickInlinePropsT, | ||
style: Substyle, | ||
|} | ||
function StickInline({ | ||
@@ -23,4 +17,6 @@ node, | ||
nestingKey, | ||
align, | ||
position, | ||
...rest | ||
}: PropsT) { | ||
}: StickInlinePropsT) { | ||
const Component = component || 'div' | ||
@@ -27,0 +23,0 @@ return ( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
357557
8990