From 9add3c41476231b8f44d55f98140e493ff49fdc7 Mon Sep 17 00:00:00 2001 From: Youssef Henna Date: Tue, 26 May 2026 18:19:25 +0200 Subject: [PATCH 1/3] Be more nativwind compatible --- .../src/components/DeckSwiper/DeckSwiper.tsx | 4 +++- .../src/components/DeckSwiper/DeckSwiperCard.tsx | 14 +++++++++++--- packages/core/src/components/LottieAnimation.tsx | 3 +-- .../MediaPlayer/AudioPlayer/AudioPlayerCommon.ts | 1 + .../AudioPlayer/AudioPlayerWithInterface.tsx | 2 ++ .../MediaPlayer/VideoPlayer/VideoPlayer.tsx | 10 ++++++++-- .../CircularProgress/CircularProgress.tsx | 2 ++ .../Progress/LinearProgress/LinearProgress.tsx | 2 ++ .../src/components/Progress/ProgressCommon.ts | 1 + .../components/SwipeableItem/SwipeableItem.tsx | 3 +++ packages/core/src/components/Swiper/Swiper.tsx | 7 ++++--- .../core/src/components/Swiper/SwiperItem.tsx | 16 ++++++++++++---- .../components/YoutubePlayer/YoutubePlayer.tsx | 3 ++- .../YoutubePlayer/YoutubePlayerProps.ts | 1 + yarn.lock | 14 +++++++------- 15 files changed, 60 insertions(+), 23 deletions(-) diff --git a/packages/core/src/components/DeckSwiper/DeckSwiper.tsx b/packages/core/src/components/DeckSwiper/DeckSwiper.tsx index 3394f011b..15ddb76c4 100644 --- a/packages/core/src/components/DeckSwiper/DeckSwiper.tsx +++ b/packages/core/src/components/DeckSwiper/DeckSwiper.tsx @@ -25,6 +25,7 @@ export interface DeckSwiperProps { keyExtractor?: (item: T) => string; renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element; style?: StyleProp; + className?: string; } const DeckSwiper = React.forwardRef>( @@ -48,6 +49,7 @@ const DeckSwiper = React.forwardRef>( keyExtractor, renderItem, style, + className, children, }: React.PropsWithChildren>, ref: React.Ref @@ -146,7 +148,7 @@ const DeckSwiper = React.forwardRef>( */ return ( - + {renderFirstCard()} { style?: StyleProp; theme: ReadTheme; } const DeckSwiperCard: React.FC< React.PropsWithChildren -> = ({ style, children, theme }) => ( +> = ({ style, children, theme, ...rest }) => ( {children} diff --git a/packages/core/src/components/LottieAnimation.tsx b/packages/core/src/components/LottieAnimation.tsx index d1a0dfbb8..6a6224a47 100644 --- a/packages/core/src/components/LottieAnimation.tsx +++ b/packages/core/src/components/LottieAnimation.tsx @@ -25,7 +25,7 @@ const LottieAnimation = forwardRef( ref ) => { return ( - + ( // A specific size is required on mobile, but not on web. // This ensures consistent behavior across platforms during preview. style={{ width: "100%", height: "100%" }} - {...rest} /> ); diff --git a/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts b/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts index fa29fc144..a90f72c5d 100644 --- a/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts +++ b/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts @@ -13,6 +13,7 @@ export interface HeadlessAudioPlayerProps extends MediaPlayerProps { } export interface AudioPlayerInterfaceProps { + className?: string; style?: StyleProp; thumbColor?: string; completedTrackColor?: string; diff --git a/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx b/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx index b88200b11..1632370bf 100644 --- a/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx +++ b/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx @@ -21,6 +21,7 @@ const AudioPlayerWithInterface = React.forwardRef< ( { style, + className, thumbColor, completedTrackColor, remainingTrackColor, @@ -127,6 +128,7 @@ const AudioPlayerWithInterface = React.forwardRef< /> ( }, ref ) => { + // @ts-ignore + const { className, ...videoPlayerProps } = rest; + const stableSource = useSourceDeepCompareMemoize( normalizeBase64Source(source, "video") ); @@ -248,7 +251,10 @@ const VideoPlayer = React.forwardRef( ref={mediaPlaybackWrapperRef} onTogglePlayback={updateAudioMode} > - + ( onFullscreenEnter={() => onFullscreenUpdate("entered")} onFullscreenExit={() => onFullscreenUpdate("exited")} allowsFullscreen={allowsFullscreen} - {...rest} + {...videoPlayerProps} /> {showPoster && posterSource && ( diff --git a/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx b/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx index 47ad689b3..bed003f0c 100644 --- a/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx +++ b/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx @@ -41,6 +41,7 @@ export const CircularProgress: React.FC< trackCustomDashArray, onFullPathWidth, startPosition = "top", + className, style, testID, }) => { @@ -128,6 +129,7 @@ export const CircularProgress: React.FC< }, style, ]} + {...(className ? ({ className } as any) : {})} > {showTrack && ( diff --git a/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx b/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx index fecf30711..b1fa55158 100644 --- a/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx +++ b/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx @@ -37,6 +37,7 @@ export const LinearProgress: React.FC = ({ customDashArray, trackCustomDashArray, onFullPathWidth, + className, style, testID, }) => { @@ -101,6 +102,7 @@ export const LinearProgress: React.FC = ({ }, style, ]} + {...(className ? ({ className } as any) : {})} > {showTrack && ( diff --git a/packages/core/src/components/Progress/ProgressCommon.ts b/packages/core/src/components/Progress/ProgressCommon.ts index 819c675ef..6830e16d2 100644 --- a/packages/core/src/components/Progress/ProgressCommon.ts +++ b/packages/core/src/components/Progress/ProgressCommon.ts @@ -25,6 +25,7 @@ export interface BaseProgressProps { customDashArray?: string; trackCustomDashArray?: string; onFullPathWidth?: (width: number) => void; + className?: string; style?: StyleProp; theme: ReadTheme; testID?: string; diff --git a/packages/core/src/components/SwipeableItem/SwipeableItem.tsx b/packages/core/src/components/SwipeableItem/SwipeableItem.tsx index c4f32c35b..b3ca20e29 100644 --- a/packages/core/src/components/SwipeableItem/SwipeableItem.tsx +++ b/packages/core/src/components/SwipeableItem/SwipeableItem.tsx @@ -50,6 +50,7 @@ import { */ export interface SwipeableItemProps extends IconSlot { + className?: string; closeOnPress?: boolean; leftOpenValue?: number; rightOpenValue?: number; @@ -74,6 +75,7 @@ type Props = SwipeableItemProps & RightSwipeProps & LeftSwipeProps; const SwipeableItem: React.FC> = ({ theme, + className, style, children: childrenProp, Icon, @@ -232,6 +234,7 @@ const SwipeableItem: React.FC> = ({ setComponentWidth(event.nativeEvent.layout.width); }} style={[styles.parentContainer, parentContainerStyles]} + {...(className ? ({ className } as any) : {})} > {/*@ts-ignore*/} void; } -export interface SwiperProps { +export interface SwiperProps extends Omit { onSwipe?: (index: number) => void; onSwipedNext?: (index: number) => void; onSwipedPrevious?: (index: number) => void; @@ -63,6 +63,7 @@ const Swiper = forwardRef>( minDistanceToCapture, style, hideDots = false, + ...rest }: SwiperProps, ref ) => { @@ -141,7 +142,7 @@ const Swiper = forwardRef>( })); return ( - + {/* @ts-ignore */} { children: React.ReactNode; style?: StyleProp; } -const SwiperItem = ({ children, style }: SwiperProps) => ( - {children} +const SwiperItem = ({ children, style, ...rest }: SwiperProps) => ( + + {children} + ); export default SwiperItem; diff --git a/packages/core/src/components/YoutubePlayer/YoutubePlayer.tsx b/packages/core/src/components/YoutubePlayer/YoutubePlayer.tsx index c2b0ec8c4..4da4504f8 100644 --- a/packages/core/src/components/YoutubePlayer/YoutubePlayer.tsx +++ b/packages/core/src/components/YoutubePlayer/YoutubePlayer.tsx @@ -9,6 +9,7 @@ const YoutubePlayer: React.FC = ({ playlist, autoplay = false, style, + className, }) => { const { viewStyles } = extractStyles(style); const defaultVideoId = "nwMUpDESXrI"; @@ -24,7 +25,7 @@ const YoutubePlayer: React.FC = ({ }; return ( - + ; + className?: string; } diff --git a/yarn.lock b/yarn.lock index a46dccd8c..6e087235f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,7 +38,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.20.0", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2", "@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0", "@babel/code-frame@^7.29.7": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.20.0", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2", "@babel/code-frame@^7.29.0", "@babel/code-frame@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.7.tgz#f2fbbfea87c44a21590ec515b778b2c26d8866e7" integrity sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw== @@ -73,7 +73,7 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.20.5", "@babel/generator@^7.25.0", "@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.29.0", "@babel/generator@^7.29.1", "@babel/generator@^7.29.7", "@babel/generator@^7.7.2": +"@babel/generator@^7.20.5", "@babel/generator@^7.25.0", "@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.29.1", "@babel/generator@^7.29.7", "@babel/generator@^7.7.2": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.7.tgz#cca0b8827e6bcf3ba176788e7f3b180ad6db2fa3" integrity sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ== @@ -148,7 +148,7 @@ "@babel/traverse" "^7.28.5" "@babel/types" "^7.28.5" -"@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.25.9", "@babel/helper-module-imports@^7.28.6", "@babel/helper-module-imports@^7.29.7": +"@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.25.9", "@babel/helper-module-imports@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz#ef25048a518e828d7393fac5882ddd73921d7396" integrity sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g== @@ -203,12 +203,12 @@ "@babel/traverse" "^7.27.1" "@babel/types" "^7.27.1" -"@babel/helper-string-parser@^7.27.1", "@babel/helper-string-parser@^7.29.7": +"@babel/helper-string-parser@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f" integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== -"@babel/helper-validator-identifier@^7.25.9", "@babel/helper-validator-identifier@^7.28.5", "@babel/helper-validator-identifier@^7.29.7": +"@babel/helper-validator-identifier@^7.25.9", "@babel/helper-validator-identifier@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2" integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== @@ -245,7 +245,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.3", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3", "@babel/parser@^7.28.6", "@babel/parser@^7.29.0", "@babel/parser@^7.29.7": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.3", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3", "@babel/parser@^7.29.0", "@babel/parser@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.7.tgz#837b87387cbf5ec5530cb634b3c622f68edb9334" integrity sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg== @@ -1088,7 +1088,7 @@ "@babel/types" "^7.29.7" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.2", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.5", "@babel/types@^7.28.6", "@babel/types@^7.29.0", "@babel/types@^7.29.7", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.2", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.5", "@babel/types@^7.29.0", "@babel/types@^7.29.7", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.7.tgz#8005e31d82712ee7adaef6e23c63b71a62770a92" integrity sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA== From 030dba762c8ef243e826166e3765fc10202dc23b Mon Sep 17 00:00:00 2001 From: Youssef Henna Date: Tue, 26 May 2026 18:32:50 +0200 Subject: [PATCH 2/3] more components --- packages/core/src/components/Layout/Spacer.tsx | 6 ++++-- packages/core/src/components/Picker/PickerCommon.ts | 1 + .../src/components/Picker/PickerInputContainer.tsx | 7 ++++++- packages/core/src/components/SVG.native.tsx | 7 ++++++- packages/core/src/components/SVG.tsx | 10 +++++++++- .../core/src/components/SectionList/SectionHeader.tsx | 11 ++++++++--- packages/core/src/components/Table/TableCell.tsx | 3 +++ packages/core/src/components/Table/TableRow.tsx | 3 +++ 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/packages/core/src/components/Layout/Spacer.tsx b/packages/core/src/components/Layout/Spacer.tsx index 50ec05f3e..c6e85f74a 100644 --- a/packages/core/src/components/Layout/Spacer.tsx +++ b/packages/core/src/components/Layout/Spacer.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { View, StyleProp, ViewStyle } from "react-native"; +import { View, ViewProps, StyleProp, ViewStyle } from "react-native"; -interface SpacerProps { +interface SpacerProps extends Omit { top?: number; right?: number; left?: number; @@ -15,6 +15,7 @@ const Spacer: React.FC = ({ bottom = 8, left = 8, style, + ...rest }) => { return ( = ({ paddingBottom: bottom, }, ]} + {...rest} /> ); }; diff --git a/packages/core/src/components/Picker/PickerCommon.ts b/packages/core/src/components/Picker/PickerCommon.ts index 1f490584a..c13c87127 100644 --- a/packages/core/src/components/Picker/PickerCommon.ts +++ b/packages/core/src/components/Picker/PickerCommon.ts @@ -12,6 +12,7 @@ export interface PickerOption { } export interface PickerInputContainerProps extends IconSlot { + className?: string; error?: boolean; placeholder?: string; disabled?: boolean; diff --git a/packages/core/src/components/Picker/PickerInputContainer.tsx b/packages/core/src/components/Picker/PickerInputContainer.tsx index c35f354dd..5494780a3 100644 --- a/packages/core/src/components/Picker/PickerInputContainer.tsx +++ b/packages/core/src/components/Picker/PickerInputContainer.tsx @@ -33,6 +33,7 @@ const PickerInputContainer: React.FC< options = [], onPress, Icon, + className, style, selectedValue, disabled = false, @@ -70,7 +71,11 @@ const PickerInputContainer: React.FC< } return ( - + ; + className?: string; }; const SVG: React.FC> = ({ source = Config.placeholderSvgURL, style, + className, }) => { return ( - }> + } + {...(className ? ({ className } as any) : {})} + > ); diff --git a/packages/core/src/components/SVG.tsx b/packages/core/src/components/SVG.tsx index 607e27532..ed8e0e1b3 100644 --- a/packages/core/src/components/SVG.tsx +++ b/packages/core/src/components/SVG.tsx @@ -6,13 +6,21 @@ import Config from "./Config"; type SVGComponentProps = { source: string; style?: StyleProp; + className?: string; }; const SVG: React.FC> = ({ source = Config.placeholderSvgURL, style, + className, }) => { - return ; + return ( + + ); }; export default SVG; diff --git a/packages/core/src/components/SectionList/SectionHeader.tsx b/packages/core/src/components/SectionList/SectionHeader.tsx index 1f8a9ec04..d805c5641 100644 --- a/packages/core/src/components/SectionList/SectionHeader.tsx +++ b/packages/core/src/components/SectionList/SectionHeader.tsx @@ -1,16 +1,21 @@ import React from "react"; -import { View, StyleProp, ViewStyle, Text } from "react-native"; +import { View, ViewProps, StyleProp, ViewStyle, Text } from "react-native"; import { withTheme } from "@draftbit/theme"; import type { ReadTheme } from "@draftbit/theme"; -interface SectionHeaderProps { +interface SectionHeaderProps extends Omit { style?: StyleProp; } const SectionHeader: React.FC> = ({ style, children, -}) => {children}; + ...rest +}) => ( + + {children} + +); interface DefaultSectionHeaderProps { title: string; diff --git a/packages/core/src/components/Table/TableCell.tsx b/packages/core/src/components/Table/TableCell.tsx index 46215383b..2916a43be 100644 --- a/packages/core/src/components/Table/TableCell.tsx +++ b/packages/core/src/components/Table/TableCell.tsx @@ -10,6 +10,7 @@ import Pressable from "../Pressable"; export interface Props extends TableProps { onPress?: () => void; style?: StyleProp; + className?: string; } const TableCell: React.FC> = ({ @@ -24,6 +25,7 @@ const TableCell: React.FC> = ({ cellHorizontalPadding, children, onPress, + className, style, }) => { const parentContextValue = React.useContext(TableStyleContext); @@ -42,6 +44,7 @@ const TableCell: React.FC> = ({ return ( void; isTableHeader?: boolean; style?: StyleProp; + className?: string; theme: ReadTheme; } @@ -30,6 +31,7 @@ const TableRow: React.FC> = ({ isTableHeader = false, children, onPress, + className, style, theme, }) => { @@ -61,6 +63,7 @@ const TableRow: React.FC> = ({ Date: Tue, 26 May 2026 18:34:41 +0200 Subject: [PATCH 3/3] simpler syntax --- packages/core/src/components/DeckSwiper/DeckSwiper.tsx | 4 +++- .../MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx | 3 ++- .../src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx | 3 ++- packages/core/src/components/Picker/PickerInputContainer.tsx | 3 ++- .../Progress/CircularProgress/CircularProgress.tsx | 3 ++- .../components/Progress/LinearProgress/LinearProgress.tsx | 3 ++- packages/core/src/components/SVG.native.tsx | 3 ++- packages/core/src/components/SVG.tsx | 3 ++- packages/core/src/components/SwipeableItem/SwipeableItem.tsx | 3 ++- packages/core/src/components/Table/TableCell.tsx | 3 ++- packages/core/src/components/Table/TableRow.tsx | 3 ++- packages/core/src/components/YoutubePlayer/YoutubePlayer.tsx | 5 ++++- 12 files changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/core/src/components/DeckSwiper/DeckSwiper.tsx b/packages/core/src/components/DeckSwiper/DeckSwiper.tsx index 15ddb76c4..e82e9e5b7 100644 --- a/packages/core/src/components/DeckSwiper/DeckSwiper.tsx +++ b/packages/core/src/components/DeckSwiper/DeckSwiper.tsx @@ -148,7 +148,9 @@ const DeckSwiper = React.forwardRef>( */ return ( - + {renderFirstCard()} ( > {showTrack && ( diff --git a/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx b/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx index b1fa55158..0f0a20c7e 100644 --- a/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx +++ b/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx @@ -102,7 +102,8 @@ export const LinearProgress: React.FC = ({ }, style, ]} - {...(className ? ({ className } as any) : {})} + // @ts-ignore + className={className} > {showTrack && ( diff --git a/packages/core/src/components/SVG.native.tsx b/packages/core/src/components/SVG.native.tsx index 874f74ac7..5266f1a11 100644 --- a/packages/core/src/components/SVG.native.tsx +++ b/packages/core/src/components/SVG.native.tsx @@ -18,7 +18,8 @@ const SVG: React.FC> = ({ return ( } - {...(className ? ({ className } as any) : {})} + // @ts-ignore + className={className} > diff --git a/packages/core/src/components/SVG.tsx b/packages/core/src/components/SVG.tsx index ed8e0e1b3..3da0509f9 100644 --- a/packages/core/src/components/SVG.tsx +++ b/packages/core/src/components/SVG.tsx @@ -18,7 +18,8 @@ const SVG: React.FC> = ({ ); }; diff --git a/packages/core/src/components/SwipeableItem/SwipeableItem.tsx b/packages/core/src/components/SwipeableItem/SwipeableItem.tsx index b3ca20e29..b6a4c9069 100644 --- a/packages/core/src/components/SwipeableItem/SwipeableItem.tsx +++ b/packages/core/src/components/SwipeableItem/SwipeableItem.tsx @@ -234,7 +234,8 @@ const SwipeableItem: React.FC> = ({ setComponentWidth(event.nativeEvent.layout.width); }} style={[styles.parentContainer, parentContainerStyles]} - {...(className ? ({ className } as any) : {})} + // @ts-ignore + className={className} > {/*@ts-ignore*/} > = ({ return ( > = ({ = ({ }; return ( - +