You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
3
3
4
4
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
5
6
+
## [1.3.0]
7
+
### Added
8
+
- Allow function locationClassName prop of SVGMap, CheckboxSVGMap and RadioSVGMap components
9
+
10
+
### Changed
11
+
- Update examples
12
+
- Externalize Jest config
13
+
- Update Jest config
14
+
6
15
## [1.2.0]
7
16
### Added
8
17
- Create CheckboxSVGMap and RadioSVGMap components
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,8 +122,8 @@ ReactDOM.render(
122
122
| map | object |**required**| Describe SVG map to display. See [maps section](#maps) for more details. |
123
123
| className | string |`'svg-map'`| CSS class of `<svg>`. |
124
124
| role | string |`'none'`| ARIA role of `<svg>`. |
125
-
| locationClassName | string or function |`'svg-map__location'`| CSS class of each `<path>`. |
126
-
| locationTabIndex | string or function |`'0'`| Tabindex each `<path>`. |
125
+
| locationClassName | string or function |`'svg-map__location'`| CSS class of each `<path>`. The function parameters are the location object and the location index. |
126
+
| locationTabIndex | string or function |`'0'`| Tabindex each `<path>`. The function parameters are the location object and the location index. |
127
127
| locationRole | string |`'none'`| ARIA role of each `<path>`. |
128
128
| onLocationMouseOver | function || Invoked when the user puts the mouse over a location. |
129
129
| onLocationMouseOut | function || Invoked when the user puts the mouse out of a location. |
@@ -136,14 +136,13 @@ ReactDOM.render(
136
136
| tabIndex | string |`'0'`|**DEPRECATED:** Although this property still works, it has been replaced by `locationTabIndex` and will be removed in next major version. |
137
137
| type | string |`'none'`|**DEPRECATED:** Although this property still works, it has been replaced by `locationRole` and will be removed in next major version. |
138
138
139
-
140
139
### CheckboxSVGMap
141
140
142
141
| Prop | Type | Default | Description |
143
142
| ---- | ---- | ------- | ----------- |
144
143
| map | object |**required**| Describe SVG map to display. See [maps section](#maps) for more details. |
145
144
| className | string |`'svg-map'`| CSS class of `<svg>`. |
146
-
| locationClassName | string |`'svg-map__location'`| CSS class of each `<path>`. |
145
+
| locationClassName | string or function |`'svg-map__location'`| CSS class of each `<path>`. The function parameters are the location object and the location index. |
147
146
| onChange | function || Invoked when the user selects/deselects a location. The list of selected locations is passed as parameter. |
148
147
| onLocationMouseOver | function || Invoked when the user puts the mouse over a location. |
149
148
| onLocationMouseOut | function || Invoked when the user puts the mouse out of a location. |
@@ -157,7 +156,7 @@ ReactDOM.render(
157
156
| ---- | ---- | ------- | ----------- |
158
157
| map | object |**required**| Describe SVG map to display. See [maps section](#maps) for more details. |
159
158
| className | string |`'svg-map'`| CSS class of `<svg>`. |
160
-
| locationClassName | string |`'svg-map__location'`| CSS class of each `<path>`. |
159
+
| locationClassName | string or function |`'svg-map__location'`| CSS class of each `<path>`. The function parameters are the location object and the location index. |
161
160
| onChange | function || Invoked when the user selects a location. The selected location is passed as parameter. |
162
161
| onLocationMouseOver | function || Invoked when the user puts the mouse over a location. |
163
162
| onLocationMouseOut | function || Invoked when the user puts the mouse out of a location. |
@@ -327,8 +326,8 @@ You can modify existing maps or create your own.
327
326
#### Modify a map
328
327
329
328
1. Import the map to modify.
330
-
2. Create a new object from this map.
331
-
3. Pass this new object as `map` prop of `<SVGMap />` component.
329
+
1. Create a new object from this map.
330
+
1. Pass this new object as `map` prop of `<SVGMap />` component.
0 commit comments