Skip to content

Commit

Permalink
apply renderXActions improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
latekvo committed Sep 25, 2024
1 parent 8f6c426 commit 2967cea
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions docs/docs/components/reanimated_swipeable.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,29 @@ an argument.

### `renderLeftActions`

method that is expected to return an action panel that is going to be revealed from the left side when user swipes right.
This map describes the values to use as inputRange for extra interpolation:
accepts a function which receives the following arguments:

SharedValue: [startValue, endValue]
- `progress` value representing swiping progress relative to the width of the returned element.
Equals `0` when `swipeable` is closed, `1` when left action is open.
Linearly increases to `Infinity` as left action overshoots it's open position.
- `translation` horizontal translation of `swipeable` in pixels.
- `swipeable` provides an object exposing the methods listed [here](#methods)

progress: [0, 1]

drag: [0, +]
This function must return a `ReactNode`.

To support `rtl` flexbox layouts use `flexDirection` styling.

### `renderRightActions`

method that is expected to return an action panel that is going to be revealed from the right side when user swipes left.
This map describes the values to use as inputRange for extra interpolation:

SharedValue: [startValue, endValue]
accepts a function which receives the following arguments:

progress: [0, 1]
- `progress` value representing swiping progress relative to the width of the returned element.
Equals `0` when `swipeable` is closed, `1` when right action is open.
Linearly increases to `Infinity` as right action overshoots it's open position.
- `translation` horizontal translation of `swipeable` in pixels.
- `swipeable` provides an object exposing the methods listed [here](#methods)

drag: [0, -]
This function must return a `ReactNode`.

To support `rtl` flexbox layouts use `flexDirection` styling.

Expand Down

0 comments on commit 2967cea

Please sign in to comment.