Skip to content

Commit 72acbb8

Browse files
ArnonZethanshar
authored andcommitted
CardSection TS fixes
1 parent ccab7a3 commit 72acbb8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

generatedTypes/components/card/CardSection.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { ViewStyle, ImageStyle, ImageSourcePropType } from 'react-native';
2+
import { ViewStyle, ImageStyle, ImageSourcePropType, StyleProp } from 'react-native';
33
import { ViewPropTypes } from '../view';
44
import { TextPropTypes } from '../text';
55
import { ImageProps } from '../image';
@@ -15,7 +15,7 @@ export declare type CardSectionProps = ViewPropTypes & {
1515
/**
1616
* Style for the content
1717
*/
18-
contentStyle?: ViewStyle;
18+
contentStyle?: StyleProp<ViewStyle>;
1919
/**
2020
* Give the section a background color
2121
*/
@@ -35,7 +35,7 @@ export declare type CardSectionProps = ViewPropTypes & {
3535
/**
3636
* The style for the background image
3737
*/
38-
imageStyle?: ImageStyle;
38+
imageStyle?: StyleProp<ImageStyle>;
3939
/**
4040
* Other image props that will be passed to the image
4141
*/
@@ -50,7 +50,7 @@ declare const _default: React.ComponentClass<ViewPropTypes & {
5050
/**
5151
* Style for the content
5252
*/
53-
contentStyle?: ViewStyle | undefined;
53+
contentStyle?: StyleProp<ViewStyle>;
5454
/**
5555
* Give the section a background color
5656
*/
@@ -70,7 +70,7 @@ declare const _default: React.ComponentClass<ViewPropTypes & {
7070
/**
7171
* The style for the background image
7272
*/
73-
imageStyle?: ImageStyle | undefined;
73+
imageStyle?: StyleProp<ImageStyle>;
7474
/**
7575
* Other image props that will be passed to the image
7676
*/

generatedTypes/components/card/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ declare const _default: React.ComponentClass<ViewPropTypes & import("react-nativ
173173
} & {
174174
text?: string | undefined;
175175
}))[] | undefined;
176-
contentStyle?: ViewStyle | undefined;
176+
contentStyle?: import("react-native").StyleProp<ViewStyle>;
177177
backgroundColor?: string | undefined;
178178
leadingIcon?: import("../image").ImageProps | undefined;
179179
trailingIcon?: import("../image").ImageProps | undefined;
180180
imageSource?: number | import("react-native").ImageURISource | import("react-native").ImageURISource[] | undefined;
181-
imageStyle?: import("react-native").ImageStyle | undefined;
181+
imageStyle?: import("react-native").StyleProp<import("react-native").ImageStyle>;
182182
imageProps?: import("../image").ImageProps | undefined;
183183
} & {
184184
useCustomTheme?: boolean | undefined;

src/components/card/CardSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import _ from 'lodash';
22
import React, {PureComponent} from 'react';
3-
import {StyleSheet, ViewStyle, ImageStyle, ImageSourcePropType} from 'react-native';
3+
import {StyleSheet, ViewStyle, ImageStyle, ImageSourcePropType, StyleProp} from 'react-native';
44
import {asBaseComponent} from '../../commons/new';
55
import View, {ViewPropTypes} from '../view';
66
import Text, {TextPropTypes} from '../text';
@@ -18,7 +18,7 @@ export type CardSectionProps = ViewPropTypes & {
1818
/**
1919
* Style for the content
2020
*/
21-
contentStyle?: ViewStyle;
21+
contentStyle?: StyleProp<ViewStyle>;
2222
/**
2323
* Give the section a background color
2424
*/
@@ -38,7 +38,7 @@ export type CardSectionProps = ViewPropTypes & {
3838
/**
3939
* The style for the background image
4040
*/
41-
imageStyle?: ImageStyle;
41+
imageStyle?: StyleProp<ImageStyle>;
4242
/**
4343
* Other image props that will be passed to the image
4444
*/
@@ -67,7 +67,7 @@ class CardSection extends PureComponent<Props> {
6767
{leadingIcon && (
6868
<Image testID={`${testID}.leadingIcon`} {...leadingIcon} />
6969
)}
70-
<View testID={`${testID}.contentContainer`} style={contentStyle}>
70+
<View testID={`${testID}.contentContainer`} style={[contentStyle]}>
7171
{_.map(
7272
content,
7373
// @ts-ignore

0 commit comments

Comments
 (0)