Skip to content

Commit

Permalink
README updates, added badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmadigan committed Aug 21, 2024
1 parent 596924c commit 620eab5
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PolicyTopology Component

[![npm version](https://img.shields.io/npm/v/react-policy-topology.svg?style=flat-square)](https://www.npmjs.com/package/react-policy-topology)

`PolicyTopology` is a reusable React component for visualizing policy topologies using DOT strings.

![PolicyTopology](./sample.png)
Expand All @@ -8,22 +10,30 @@

### Installation

To install the dependencies, run:
To use the `PolicyTopology` component, you need to install the necessary dependencies.

First, make sure you have Node.js (>=18) and npm installed. Then, in your project directory, run:

```bash
npm install
npm install react react-dom react-policy-topology
```

This will install `react-policy-topology` along with its peer dependencies, `react` and `react-dom`.

### Usage

To use the `PolicyTopology` component, import it into your React application and pass the required props.
To use the `PolicyTopology` component in your React application, follow these steps:

TODO: Publish to npm.
1. Import the `PolicyTopology` component:

```jsx
import React from 'react';
import PolicyTopology from './PolicyTopology.js';
import PolicyTopology from 'react-policy-topology';
```

2. Use the component in your application:

```jsx
const App = () => {
const dotString = `your DOT string here`;

Expand Down Expand Up @@ -83,4 +93,4 @@ Contributions are welcome! Please open an issue or submit a pull request.

## License

This project is licensed under the Apache v2 License.
This project is licensed under the Apache v2 License.

0 comments on commit 620eab5

Please sign in to comment.