Skip to content

Commit 5971018

Browse files
committed
Revert changes in margin modifiers typings
1 parent 913855e commit 5971018

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

demo/src/screens/componentScreens/CardsScreen.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
160160
renderCoupons = () => {
161161
return (
162162
<View row spread marginB-10>
163+
{/* @ts-expect-error */}
163164
{this.renderCoupon({'marginR-10': true})}
165+
{/* @ts-expect-error */}
164166
{this.renderCoupon({'marginL-10': true})}
165167
</View>
166168
);
@@ -185,6 +187,7 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
185187
<View row spread height={160}>
186188
{
187189
// Icon
190+
// @ts-expect-error
188191
this.renderComplexImage({'marginR-5': true},
189192
<Card.Section
190193
flex
@@ -202,6 +205,7 @@ export default class CardsScreen extends Component<CardsScreenProps, CardsScreen
202205
}
203206
{
204207
// Image with overlay content
208+
// @ts-expect-error
205209
this.renderComplexImage({'marginL-5': true},
206210
<Card.Section
207211
flex

demo/src/screens/componentScreens/GridViewScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class GridViewScreen extends Component {
5353
descriptionLines: 2,
5454
alignToStart: true,
5555
onPress: () => Alert.alert('My price was ' + product.formattedPrice + ', now it is $50')
56-
})))(products),
56+
})))(products) as GridViewProps['items'],
5757
dynamicLayout: _.flow(products => _.take(products, 3),
5858
(products: any[]) =>
5959
_.map(products, product => ({

src/commons/modifiers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ export type BackgroundColorModifier = Modifier<'bg'>;
102102
export type AlignmentModifiers = Modifier<AlignmentLiterals>;
103103
export type PositionModifiers = Modifier<PositionLiterals>;
104104
export type PaddingModifiers = Modifier<PaddingLiterals>;
105-
// export type MarginModifiers = Modifier<MarginLiterals>;
106-
export type MarginModifiers = {[key: `${MarginLiterals}-${number}`]: boolean};
105+
export type MarginModifiers = Modifier<MarginLiterals>;
106+
// TODO: This caused issue with with some typings that inherit this type
107+
// export type MarginModifiers = Partial<{[key: `${MarginLiterals}-${number}`]: boolean}>;
107108
export type FlexModifiers = Modifier<FlexLiterals>;
108109
export type BorderRadiusModifiers = Modifier<BorderRadiusLiterals>;
109110

src/components/picker/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ const Picker = React.forwardRef((props: PickerProps, ref) => {
288288
// @ts-expect-error - hopefully will be solved after the picker migration ends
289289
renderPicker(value, label)
290290
) : (
291-
// @ts-expect-error
292291
<TextFieldMigrator
293292
migrate={migrateTextField}
294293
// customWarning="RNUILib Picker component's internal TextField will soon be replaced with a new implementation, in order to start the migration - please pass to Picker the 'migrateTextField' prop"

0 commit comments

Comments
 (0)