0.0.1 • Published 5 years ago
@commitd/annotation-viewer v0.0.1
@committed/annotation-viewer
Annotation Viewer

Install
yarn add @committed/annotation-viewerUsage
import * as React from 'react'
import Viewer from '@committed/annotation-viewer'
class Example extends React.Component {
render() {
return (
<Viewer
text="The British people are represented by members of Parliament"
marks={[
{
offset: 4,
length: 7,
markType: 'NORP'
},
{
offset: 49,
length: 10,
markType: 'ORG'
}
]}
inlines={[
{
offset: 4,
length: 55
}
]}
/>
)
}
}Development
The main build is currently performed using Rollup and yarn build.
We use storybook to develop and document the components, this is run in development using
yarn storybookand to create a production version
yarn build-storybookExample
To run the example:
yarn
yarn build
cd example
yarn
yarn startLicense
0.0.1
5 years ago