Skip to content

Commit 8a74cc7

Browse files
committed
docs: fix some format error
1 parent cf373fd commit 8a74cc7

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,28 @@ Babel plugin to transform class names into cssobj localized names, easily transf
4343
)
4444
```
4545

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).
4747

4848
## More Usage
4949

50-
This plugin only transform the format: `result.mapClass(JSX)`
50+
This plugin only transform the format: **result.mapClass(JSX)**
5151

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:
5353

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
5860

59-
1. transform the method call as `myObj['mapClass']`
61+
1. Transform the method call as `myObj['mapClass']`
6062

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`
6264

6365
``` json
6466
{
65-
"plugins": [ ["transform-cssobj-jsx", {mapName: 'makeLocal'}] ]
67+
"plugins": [ ["transform-cssobj-jsx", {"mapName": "makeLocal"}] ]
6668
}
6769
```
6870

0 commit comments

Comments
 (0)