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
| `className` | The `className` applied directly to the `<svg>` element. | string | "" |
278
-
| `style` | The style object applied directly to the `<svg>` element. | CSSProperties<sup>1</sup> | {} |
279
+
| `style` | The style object applied directly to the `<svg>` element. | CSSProperties<sup>\*</sup> | {} |
279
280
| `color` | The default color of each municipality. | CSSProperties["fill"] | #ccc |
280
281
| `clickable` | Whether the clickable styles should be applied to the `<path>` element (the area). | boolean | false |
281
282
| `hoverable` | Whether the hoverable styles should be applied to the `<path>` element (the area). | boolean | true |
282
283
| `showTooltip` | Whether the tooltip should be shown. | boolean | true |
283
-
| `customTooltip` | A function that returns a custom tooltip. | (area: AreaType<sup>2</sup>) => ReactNode | |
284
+
| `customTooltip` | A function that returns a custom tooltip. | (area: AreaType<sup>\*\*</sup>) => ReactNode | |
284
285
| `customizeAreas` | A function that is invoked for every area and returns an object to style the area. | (area: AreaType) => { className?: string, style? CSSProperties } \| undefined | |
285
286
| `onClick` | A function that is invoked when an area is clicked. | (area: AreaType) => void | |
286
287
| `onHover` | A function that is invoked when an area is hovered. | (area: AreaType) => void | |
287
288
| `onMouseEnter` | A function that is invoked when the mouse enters an area. | (area: AreaType) => void | |
288
289
| `onMouseLeave` | A function that is invoked when the mouse leaves an area. | (area: AreaType) => void | |
289
290
290
-
1: CSSProperties refers to the object provided to the style attribute in React. Fields in this object are denoted as CSSProperties["property"].
291
+
\*: CSSProperties refers to the object provided to the style attribute in React. Fields in this object are denoted as CSSProperties["property"].
291
292
292
-
2: AreaType is one of the four types corresponding to the component used (see "Types" below).
293
+
\*\*: AreaType is one of the four types corresponding to the component used (see "Types" below).
293
294
294
295
### Types
295
296
@@ -309,12 +310,15 @@ type AreaType = {
309
310
310
311
The types corresponding to each component are:
311
312
312
-
| Component | Name of exported type | Included in type |
\*: When filtering using any of the strings in the ConstituencyType be aware that the constituencies (danish: "storkredse"), e.g. "sydjyllands storkreds", have the word "storkreds" omitted in the properties `id`, `name` and `en_name`. Thus, "sydjyllands storkreds" is just "sydjyllands" and so on.
318
322
319
323
Using the `Denmark` component means that there's only one path element, so DenmarkType describes just that one area.
0 commit comments