Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed May 25, 2023
2 parents 81ea4af + 4eb2f72 commit ace1856
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For trees larger than about 6M tips, loading local trees in the browser at Taxon

### use Taxonium in my own web application?

See the documentation for the Taxonium component.
Use the [Taxonium component](./taxonium_component).

## See Taxonium in action

Expand Down
16 changes: 10 additions & 6 deletions taxonium_component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here's an example of how to set up the source data and use the Taxonium componen

First, set up the source data in JavaScript:

```{js}
```js
const nwk = `((A:0.1,B:0.2):0.3,(C:0.4,D:0.5):0.6);`;

const metadata_text =
Expand Down Expand Up @@ -42,7 +42,7 @@ const sourceData = {

In React, you can use the Taxonium component as follows:

```{js}
```js
import Taxonium from 'taxonium-component';

const App = () => {
Expand All @@ -54,7 +54,7 @@ const App = () => {

If you're working with basic HTML, you can include the Taxonium component using a script tag:

```{html}
```html
<body>
<div id="root"></div>

Expand All @@ -63,7 +63,11 @@ If you're working with basic HTML, you can include the Taxonium component using
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>

<!-- Include Taxonium Component -->
<script src="https://unpkg.com/[email protected]/dist/taxonium-component.umd.js"></script>
<script src="https://unpkg.com/taxonium-component"></script>

<script>
// Source data code from above
</script>

<script>
const MyComponent = TaxoniumComponent.Taxonium;
Expand All @@ -81,7 +85,7 @@ If you're working with basic HTML, you can include the Taxonium component using

### Developing the package

```
```bash
yarn install
yarn storybook
```
```

0 comments on commit ace1856

Please sign in to comment.