From e57ee27354d345e8e8f2abf94e768413e4d31199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Unneb=C3=A4ck?= Date: Thu, 24 Dec 2020 13:24:15 +0100 Subject: [PATCH] Tighten types on preventSwipe prop --- index.d.ts | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index a1149f6..44fdefc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -38,7 +38,7 @@ declare interface Props { * * @default [] */ - preventSwipe?: string[] + preventSwipe?: ('left' | 'right' | 'up' | 'down')[] } declare const TinderCard: React.FC diff --git a/readme.md b/readme.md index 35fabe2..d5c3b31 100644 --- a/readme.md +++ b/readme.md @@ -72,7 +72,7 @@ Callback that will be executed when a `TinderCard` has left the screen. It will ### `preventSwipe` - optional -- type: `Array` +- type: `Array` - default: `[]` An array of directions for which to prevent swiping out of screen. Valid arguments are `'left'`, `'right'`, `'up'` and `'down'`.