File tree 1 file changed +12
-10
lines changed 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -43,26 +43,28 @@ Babel plugin to transform class names into cssobj localized names, easily transf
43
43
)
44
44
` ` `
45
45
46
- Note: According to ** cssobj** ` mapClass` rule, the ` !news` will become ` news` and not localized (aka keep AS IS ).
46
+ ** Note** : According to ** cssobj** ` mapClass` rule, the ` !news` will become ` news` and not localized (aka keep AS IS ).
47
47
48
48
## More Usage
49
49
50
- This plugin only transform the format: ` result.mapClass(JSX)`
50
+ This plugin only transform the format: ** result .mapClass (JSX )**
51
51
52
- But if your existing code already has the form, you have two way to escape the transform
52
+ But if your existing code already has the form, . e . g :
53
53
54
- ` ` ` Javascript
55
- // existing code, you don't want below to transform
56
- myObj.mapClass(<div className='abc'>)
57
- ` ` `
54
+ ` ` ` Javascript
55
+ // existing code, you don't want below to transform
56
+ myObj.mapClass(<div className='abc'>should not be transformed</div>)
57
+ ` ` `
58
+
59
+ You have two way to escape the transform
58
60
59
- 1. transform the method call as ` myObj['mapClass']`
61
+ 1. Transform the method call as ` myObj['mapClass']`
60
62
61
- 2. pass a plugin option ` mapName` to use other name rather than ` mapClass`
63
+ 2. Pass ** plugin option** ` mapName` to use other name rather than ` mapClass`
62
64
63
65
` ` ` json
64
66
{
65
- "plugins": [ ["transform-cssobj-jsx", {mapName: ' makeLocal' }] ]
67
+ "plugins": [ ["transform-cssobj-jsx", {" mapName": " makeLocal" }] ]
66
68
}
67
69
` ` `
68
70
You can’t perform that action at this time.
0 commit comments