Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Commit d4baea1

Browse files
committed
Merge pull request #66 from talkol/patch-1
No need to create StyleSheets dynamically
2 parents 4523c89 + 1e3864e commit d4baea1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,24 +220,24 @@ var Swipeout = React.createClass({
220220
var limit = -this.state.btnsRightWidth
221221
if (posX > 0) var limit = this.state.btnsLeftWidth
222222

223-
var styleLeftPos = StyleSheet.create({
223+
var styleLeftPos = {
224224
left: {
225225
left: 0,
226226
overflow: 'hidden',
227227
width: Math.min(limit*(posX/limit), limit),
228228
}
229-
})
230-
var styleRightPos = StyleSheet.create({
229+
}
230+
var styleRightPos = {
231231
right: {
232232
left: Math.abs(contentWidth + Math.max(limit, posX)),
233233
right: 0,
234234
}
235-
})
236-
var styleContentPos = StyleSheet.create({
235+
}
236+
var styleContentPos = {
237237
content: {
238238
left: this._rubberBandEasing(posX, limit),
239239
}
240-
})
240+
}
241241

242242
var styleContent = [styles.swipeoutContent]
243243
styleContent.push(styleContentPos.content)

0 commit comments

Comments
 (0)