From 668421c8510ebd1734ca12b5430e050d046dde83 Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Thu, 25 May 2023 19:18:23 +0100 Subject: [PATCH] updates --- docs/component.md | 44 ++++++++++++++++++++++++++++-------- taxonium_component/README.md | 4 +--- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/docs/component.md b/docs/component.md index 98c18e8e..2ed4a57e 100644 --- a/docs/component.md +++ b/docs/component.md @@ -9,7 +9,7 @@ Taxonium is now available as a React component. There are a few different ways y ## Basic HTML -``` +```js
@@ -18,13 +18,38 @@ Taxonium is now available as a React component. There are a few different ways y - - + + + @@ -47,7 +72,7 @@ yarn add taxonium-component ### Import and use Taxonium Component in your React jsx -``` +```js import Taxonium from 'taxonium-component'; const App = () => { @@ -65,7 +90,7 @@ In either case the following properties are available. | ---------- | --------------------- | ------- | -------------------------------------------------------------- | | backendUrl | string | None | (Optional) a backend to connect to | | sourceData | Javascript dictionary | None | (Optional) Tree / metadata to load locally (see section below) | -| configDict | Javascript dictionary | None | (Optional) configuration | +| configDict | Javascript dictionary | None | (Optional) configuration (see [advanced](./advanced.md)) | ## sourceData @@ -73,7 +98,7 @@ The `sourceData` property allows you to load a tree and metadata directly into t Examples: -``` +```js sourceData: { status: "url_supplied", filename: @@ -81,8 +106,7 @@ sourceData: { filetype: "jsonl", } ``` - -``` +```js sourceData: { status: "loaded", filename: "test.nwk", diff --git a/taxonium_component/README.md b/taxonium_component/README.md index 28ea1a7f..1e0b514d 100644 --- a/taxonium_component/README.md +++ b/taxonium_component/README.md @@ -70,10 +70,8 @@ If you're working with basic HTML, you can include the Taxonium component using