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
* small improvements and refactoring
* updated test and readme
* Update README.md
forgot that
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* comment updates
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+46-38Lines changed: 46 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,15 +44,15 @@ yarn i <YOUR_LINK_WITH_API_KEY>
44
44
yarn add @linkurious/ogma-react
45
45
```
46
46
47
-
You will need the CSS or Styled Components (see [`web/src/index.css`](https://github.com/Linkurious/ogma-react/blob/develop/demo/src/index.css) for an example). No CSS is included by default.
47
+
You will need the CSS or Styled Components (see [`demo/src/index.css`](https://github.com/Linkurious/ogma-react/blob/develop/demo/src/index.css) for an example). No CSS is included by default.
| `className?` | `string`| `ogma-container` | className for the ogma container |
238
238
| `graph?` | `Ogma.RawGraph` | `null` | The graph to render |
239
+
| `onEventName?` | `(event: EventTypes<ND, ED>[K]) => void` | `null` | The handler for an [event](https://doc.linkurious.com/ogma/latest/api/events.html). The passed in function should always be the result of the `useEvent` hook to have a stable function identity and avoid reassigning the same handler at every render. |
239
240
| `onReady?` | `(ogma: Ogma) => void` | `null` | Callback when the Ogma instance is ready |
240
-
| `ref?` | `React.Ref<Ogma>` | `null` | Reference to the Ogma instance |
241
-
| `children?` | `React.ReactNode` | `null` | The children of the component, such as `<Popup>` or `<Tooltip>` or your custom component. Ogma instance is avalable to the children components through `useOgma()` hook |
| `theme?` | [`Ogma.Theme`](https://doc.linkurious.com/ogma/latest/api/types/theme.html) | `null` | The theme of the graph. Keep in mind that adding `<NodeStyle>` and `<EdgeStyle>` components will overwrite the theme's styles |
243
-
| `onEventName?` | `(event: EventTypes<ND, ED>[K]) => void` | `null` | The handler for an [event](https://doc.linkurious.com/ogma/latest/api/events.html). The passed in function should always be the result of the `useEvent` hook to have a stable function identity and avoid reassigning the same handler at every render. |
244
-
| `className?` | `string` | `ogma-container` | className for the ogma container |
243
+
| `children?` | `React.ReactNode` | `null` | The children of the component, such as `<Popup>` or `<Tooltip>` or your custom component. Ogma instance is avalable to the children components through `useOgma()` hook |
244
+
| `ref?` | `React.Ref<Ogma>` | `null` | Reference to the Ogma instance |
245
245
246
246
### `<NodeStyle />`
247
247
@@ -367,8 +367,8 @@ Wrapper to the Ogma `StyleClass` class. It allows you to apply styles to nodes a
| **`name`** | `string` | | The class name to apply the styles to |
370
-
| `nodeAttributes` | [`Ogma.NodeAttributesValue`](https://doc.linkurious.com/ogma/latest/api/types/nodeattributesvalue.html) | `{}` | Attributes to apply to the nodes or edges |
371
-
| `edgeAttributes` | [`Ogma.EdgeAttributesValue`](https://doc.linkurious.com/ogma/latest/api/types/edgeattributesvalue.html) | `{}` | Attributes to apply to the edges |
370
+
| `edgeAttributes?` | [`Ogma.EdgeAttributesValue`](https://doc.linkurious.com/ogma/latest/api/types/edgeattributesvalue.html) | `{}` | Attributes to apply to the edges |
371
+
| `nodeAttributes?` | [`Ogma.NodeAttributesValue`](https://doc.linkurious.com/ogma/latest/api/types/nodeattributesvalue.html) | `{}` | Attributes to apply to the nodes or edges |
0 commit comments