Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@committed/annotation-viewer

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@committed/annotation-viewer

Annotation Viewer

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@committed/annotation-viewer

Annotation Viewer

Committed Badge Build Status Storybook

Install

yarn add @committed/annotation-viewer @committed/components @material-ui/core

Peer dependencies

yarn add  @committed/components @material-ui/core

Usage

import React from 'react'
import { AnnotationViewer } from '@committed/annotation-viewer'

class Example extends React.Component {
  render() {
    return (
      <AnnotationViewer
        text="The British people are represented by members of Parliament"
        marks={[
          {
            offset: 4,
            length: 7,
            type: 'NORP',
          },
          {
            offset: 49,
            length: 10,
            type: 'ORG',
          },
        ]}
        inlines={[
          {
            offset: 4,
            length: 55,
            type: 'Link',
          },
        ]}
      />
    )
  }
}

NB The committed component ThemeProvider must be in the react component stack. (Future versions may remove these pees dependencies.)

Further examples of use and configuration options can be seen in the storybook.

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 storybook

and to create a production version

yarn build-storybook

Example

To run the example:

yarn
yarn build
cd example
yarn
yarn start

License

MIT - © Committed Software 2020 https://committed.io

FAQs

Package last updated on 11 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc