1.9.2 • Published 2 years ago

dcmcloud-ui v1.9.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

NPM version NPM downloads All Contributors MIT License

This set of "Medical Imaging Viewer" React components are maintained separately to:

  • Decouple presentation from business logic
  • Test and develop components in isolation
  • Provide well documented, reusable components
  • Aid rapid application development for context specific viewers

Install

This component library is pre- v1.0. All realeases until a v1.0 have the possibility of introducing breaking changes. Please depend on an "exact" version in your projects to prevent issues caused by loose versioning.

For full installation instructions, be sure to check out our getting started guide.

// with npm
npm i @dcmcloud/ui --save-exact

// with yarn
yarn add @dcmcloud/ui --exact

Usage

import React, { Component } from 'react';
import { LayoutButton } from '@dcmcloud/ui';

class Example extends Component {
  constructor(props) {
    super(props);

    this.state = {
      selectedCell: {
        className: 'hover',
        col: 1,
        row: 1,
      },
    };
  }

  render() {
    return (
      <LayoutButton
        selectedCell={this.state.selectedCell}
        onChange={cell => this.setState({ selectedCell: cell })}
      />
    );
  }
}

Developing Locally

Restore dependencies after cloning:

# Restore workspace dependencies (from repository root)
yarn install

# From project root
yarn run dev:ui

# OR from this project's directory
yarn run dev

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © DCMCloud