From 65a0ee4446364cf668e91993554487f23b99bc02 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 15 Sep 2024 17:30:34 +0100 Subject: [PATCH 1/2] docs: fix migration to V2 docs tsc error --- documentation/docs/guides/migrating-to-v2.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/documentation/docs/guides/migrating-to-v2.md b/documentation/docs/guides/migrating-to-v2.md index f2a8500c..ad6b4755 100644 --- a/documentation/docs/guides/migrating-to-v2.md +++ b/documentation/docs/guides/migrating-to-v2.md @@ -67,16 +67,15 @@ import { import Text from './Text'; import {Theme} from './theme'; -const restyleFunctions = composeRestyleFunctions([ - spacing, - border, - backgroundColor, -]); -type Props = SpacingProps & +type RestyleProps = SpacingProps & BorderProps & - BackgroundColorProps & { - onPress: () => void; - }; + BackgroundColorProps + +const restyleFunctions = composeRestyleFunctions([spacing, border, backgroundColor]); + +type Props = RestyleProps & { + onPress: () => void; +}; const Button = ({onPress, label, ...rest}: Props) => { const props = useRestyle(restyleFunctions, rest); From 79e81689ab8fea639d39aa533fcab9ab29c6cc27 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 15 Sep 2024 17:41:03 +0100 Subject: [PATCH 2/2] docs: add label prop to v2 migration doc --- documentation/docs/guides/migrating-to-v2.md | 1 + fixture/android/gradlew | 0 2 files changed, 1 insertion(+) mode change 100755 => 100644 fixture/android/gradlew diff --git a/documentation/docs/guides/migrating-to-v2.md b/documentation/docs/guides/migrating-to-v2.md index ad6b4755..215610ba 100644 --- a/documentation/docs/guides/migrating-to-v2.md +++ b/documentation/docs/guides/migrating-to-v2.md @@ -75,6 +75,7 @@ const restyleFunctions = composeRestyleFunctions([spacing, type Props = RestyleProps & { onPress: () => void; + label: string }; const Button = ({onPress, label, ...rest}: Props) => { diff --git a/fixture/android/gradlew b/fixture/android/gradlew old mode 100755 new mode 100644