2.4.0 • Published 1 year ago

airview-ui v2.4.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Airview UI

Airview UI is a collection of React UI components; these components can be composed to build an interface to render an application, which allows a user to navigate to specific Markdown documents.

Consuming the package

The package can be installed via npm, within your working directory run:

npm i airview-ui

Peer dependencies

The package has a peer dependency of Material UI, the components of this package are built on-top of this library.

Airview UI Theme Provider

To start using the airview-ui components, you must first wrap your application in an instance of <AirviewUiThemeProvider /> to provide required styling context.

The <AirviewUiThemeProvider /> component is an extension of the native Material UI theme provider; it accepts an optional themeConfig prop, which is an object as per the agument of the native Material UI createTheme() function.

Usage:

import { AirviewUiThemeProvider } from "airview-ui";

const config = {
  // ... your optional MUI config options
};

function App() {
  return (
    <AirviewUiThemeProvider themeConfig={config}>
      {/*child components */}
    </AirviewUiThemeProvider>
  );
}

Component API

Airview UI provides a base set of components that will allow you to compose an opinionated documentation viewer interface. An example of all components and the props API can be viewed via the StoryBook living documentation.

To view the StoryBook:

  1. Start by checking out main branch at https://github.com/AirWalk-Digital/airview
  2. Once cloned, cd into the root of the airview project directory and run npm install to install all package dependencies
  3. On successfull installation of project dependencies, cd into the airview-ui package and run npm run storybook. This will start Storybook and provide a local URL to access the StoryBook from within your chosen browser.

Note: A requirement for building StoryBook is node.js LTS, currently greater that version 16.15.1 but less than version 17.0.0.

Contributing to the package

Cloning the package for local development

Airview UI is part of a monorepo and therefore needs to be checked out from the root Airview repository. See the main README for instructions on how to do this here

Tooling

Global development tooling is available for the package, you can learn more about this here

Build scripts

npm scripts are available for development and production builds, these call Rollup to bundle our source. Note: these scripts are local and should be run from a terminal mounted at the root of the airview-ui directory.

Building for production:

To build / package the source for production, run the npm script below. This will output a bundle index.js to a dist directory within the airview-ui package root.

npm run build

Building for development:

For development, a build script is available that will bundle the source in watch mode; you can continue to work on the package source and the bundle will be automatically rebuilt each time a file within the dist directory is modified.

Note: the bundle within the dist directory SHOULD NOT be deployed to production.

To build for development run

npm run dev

Peer dependencies

All peer dependencies should be manually added to the peerDependencies key within the package.json file in the airview-ui root. Only dev dependencies should be added using the npm install command.

To optimise the bundle size, peer dependencies need to be flagged within rollup.config.js file, under the external array. This will prevent the peer dependency source from being bundled into the package source.

You can learn more about declaring external dependencies within a Rollup config here

Additional requrements for contributing

The current requirements around contributing are fairly loose; however we do enforce a few requirements. You can learn more about these requirements here.

Issues, bugs and feature requests

Information on issue tracking and feature requests can be found on the repo root README here

2.4.0

1 year ago

2.2.3

1 year ago

2.3.8

1 year ago

2.3.7

1 year ago

2.3.9

1 year ago

0.1.1

1 year ago

2.3.0

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.6

1 year ago

2.3.5

1 year ago

2.3.17

1 year ago

2.3.16

1 year ago

0.2.1

1 year ago

2.3.13

1 year ago

2.3.12

1 year ago

2.3.15

1 year ago

2.3.14

1 year ago

2.3.11

1 year ago

2.3.10

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.0.53

1 year ago

0.1.0

1 year ago

0.0.52

1 year ago

0.0.51

1 year ago

0.0.50

1 year ago

0.0.49

2 years ago

0.0.48

2 years ago

0.0.47

2 years ago

0.0.46

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago

0.0.36

2 years ago

0.0.35

2 years ago

0.0.34

2 years ago

0.0.33

2 years ago

0.0.32

2 years ago

0.0.31

2 years ago

0.0.30

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago