File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
packages/uniwind/src/metro/processor Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,18 @@ export class RN {
181181 cssToRN ( property : string , value : any ) {
182182 const transformedProperty = property . startsWith ( '--' )
183183 ? property
184- : toCamelCase ( property )
184+ : pipe ( property ) (
185+ toCamelCase ,
186+ x => {
187+ if ( x . includes ( 'padding' ) || x . includes ( 'margin' ) ) {
188+ return x
189+ . replace ( 'Inline' , 'Horizontal' )
190+ . replace ( 'Block' , 'Vertical' )
191+ }
192+
193+ return x
194+ } ,
195+ )
185196
186197 const rn = this . transformProperty (
187198 transformedProperty ,
@@ -202,18 +213,7 @@ export class RN {
202213 const propertyEnd = property . includes ( 'border' )
203214 ? property . split ( 'border' ) . at ( - 1 ) ?? ''
204215 : ''
205- const transformedProperty = pipe ( property ) (
206- x => x . replace ( propertyEnd , '' ) ,
207- x => {
208- if ( x . includes ( 'padding' ) || x . includes ( 'margin' ) ) {
209- return x
210- . replace ( 'Inline' , 'Horizontal' )
211- . replace ( 'Block' , 'Vertical' )
212- }
213-
214- return x
215- } ,
216- )
216+ const transformedProperty = property . replace ( propertyEnd , '' )
217217
218218 if ( properties . every ( property => [ 'row' , 'column' ] . includes ( property ) ) ) {
219219 return {
You can’t perform that action at this time.
0 commit comments