React component library to build TeleMedicine apps

Usage no npm install needed!

<script type="module">
  import aitmedReact from 'https://cdn.skypack.dev/@aitmed/react';


@aitmed/react (pending release)

A react component library to assist in establishing online TeleMedicine services through user interfaces on the client.

(View the documentation)


npm install --save @aitmed/react

This library requires that you have react@^16.9.0. You will also need to install material-ui with a version higher than v4 since there are syntactical differences in ThemeProvider between versions.


The first thing you want to do is to wrap your app with either your own ThemeProvider or by exporting it from @aitmed/react. We prefer that you use the one exported from the library:

import React from 'react'
import { ThemeProvider } from '@aitmed/react'
import MyComponent from './MyComponent'

// optional. It will use the default theme internally if this isn't provided
const theme = {...}

const App = () => (
  <ThemeProvider theme={theme}>
    <MyComponent />

export default App

If you want to provide your own theme object when using our ThemeProvider, you can pass it into the ThemeProvider (note: it has to be a plain JavaScript object). It will be merged with our theme object so that your changes will still be applied.

We support both the require syntax as well as import:

// CommonJS
const { Button, LoadingSpinner } = require('@aitmed/react')

// ES6
import { Button, LoadingSpinner } from '@aitmed/react'
// alias for the above. provided in case you want to be consistent with the imports below
import { Button, LoadingSpinner } from '@aitmed/react/dist/components'
// you will have to use /components/ here to get to the finalForm components
import { CreditCard, OutputTextField } from '@aitmed/react/dist/components/finalForm'
import { DWC_PR1, DWC_PR2, DWC_RFA } from '@aitmed/react/forms'
import { useModal, useCache } from '@aitmed/react/hooks'
import { useObjectizedCheckboxes } from '@aitmed/react/hooks/finalForm'
import { ICD10 } from '@aitmed/react/finalForm/modules'
import { finalForm, info, callAll } from '@aitmed/react/utils'

More documentation is underway. The rest of the documentation will mostly be in storybook.

Components (stub)

Forms (stub)

Hooks (stub)

Modules (stub)

Utilities (stub)