Skip to content

Commit 2304f47

Browse files
committed
docs: Formatting errors
1 parent 47ccffc commit 2304f47

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ A tiny wrapper for [react-leaflet](https://react-leaflet.js.org/)'s `<Marker />`
1616

1717
The approach this library uses differs from other approaches that use `renderToString` in that it instead uses React's [Portal](https://react.dev/reference/react-dom/createPortal) functionality to achieve the effect. That means the component is not static, but a full first-class component that can have its own state, event handlers & lifecycle.
1818

19-
I struggled to find something that worked in this way I could drop something in from a design system in there and have all the context available such that it works, and all the interactions working as they should.
19+
I struggled to find something that worked in a way where I could simply drop something in from a design system, and have all the context available such that it works, as well as all the interactions working as they should.
20+
21+
Many existing packages exist but they use techniques that mean they are very limited.
2022

2123
# Installation
2224

@@ -88,14 +90,14 @@ The `componentIconOpts` prop can be passed, which is an object with additional o
8890

8991
Below is a list of properties this object can be provided.
9092

91-
### `layoutMode`
93+
#### `layoutMode`
9294

9395
The `layoutMode` controls how the bounding box of the React component marker behaves. It accepts two options:
9496

9597
- `fit-content` _(default)_. In this mode, the React component itself defines the dimensions of the marker. The component can shrink and expand at will. Logic internally to this library centers the component on its coordinates to match Leaflets default positioning; however, Leaflet itself is effectively no longer in control of this.
9698
- `fit-parent`. In this mode, the dimensions of the React component marker are bound by the `iconSize` passed to `componentIconOpts.rootDivOpts`. Leaflet is therefore in control of the dimensions and positioning. Component markers should use elements with 100% width & height to fill the available size if needed.
9799

98-
## `rootDivOpts`
100+
#### `rootDivOpts`
99101

100102
> [!NOTE]
101103
> Some options are not supported since they do not apply or make sense in the case of a React component marker. The unsupported options are `html`, `bgPos`, `shadowUrl`, `shadowSize`, `shadowAnchor`, `shadowRetinaUrl`, `iconUrl` and `iconRetinaUrl`.
@@ -104,25 +106,25 @@ An object containing properties from the supported subset of the underlying Leaf
104106

105107
If using `fit-parent`, you must set `iconSize` here.
106108

107-
## `disableScrollPropagation`
109+
#### `disableScrollPropagation`
108110

109111
`false` by default.
110112

111113
If set to `true`, panning/scrolling the map will not be possible "through" the component marker.
112114

113-
## `disableClickPropagation`
115+
#### `disableClickPropagation`
114116

115117
`false` by default.
116118

117119
If set to `true`, clicking on the component marker will not be captured by the underlying map.
118120

119-
## `unusedOptsWarning`
121+
#### `unusedOptsWarning`
120122

121123
`true` by default.
122124

123125
Can be set to `false` in order to not warn in console about cases where `componentIconOpts` was set but `icon` was not a React component.
124126

125-
## `unusedOptsWarning`
127+
#### `unusedOptsWarning`
126128

127129
`true` by default.
128130

0 commit comments

Comments
 (0)