1.6.5 • Published 4 years ago

@brainit/uat-components v1.6.5

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Shared UI Components

YARN REACT TYPESCRIPT

Shared UI Components for Universal Aviation Training Web Applications.

Setup

  1. Install dependencies:

    yarn install
  2. Compile library to dist/:

    yarn run start

    This command continues to watch for changes in src/ module and recompiles the library automatically.

Example project

Library components is tested and showcased in example project using next steps:

  1. Navigate to example folder from the project root:

    cd example
  2. Install dependencies for example project:

    yarn install
  3. Run example/showcase project in browser and see components in action:

    yarn run start

Usage from example project

Components can be imported from library's dist/ folder using absolute import:

import {
  TextHeadline1,
  Logo,
  TextInput
} from "components";
import "components/dist/index.css";

const Example = () => (
  <>
    <TextHeadline1>Headline</TextHeadline1>
    <Logo />
    <TextInput />
  </>
);

Integration to other projects

  1. Link uat-components library to yarn from the library's project root:

    yarn link

    Library name is defined in package.json.

  2. Link library's react module to yarn:

    cd node_modules/react
    yarn link

    This step is required because Invalid Hook Call Warning exception will be raised since library uses react-hooks.

  3. Position to the root of the project where you want to integrate the library.

  4. Link uat-components library from yarn:

    yarn link uat-components
  5. Link react from yarn:

    yarn link react

Usage in other projects

Components can be imported from library using library name:

import {
  TextHeadline1,
  Logo,
  TextInput
} from "uat-components";
import "uat-components/dist/index.css";

const MyProject = () => (
  <>
    <TextHeadline1>Headline</TextHeadline1>
    <Logo />
    <TextInput />
  </>
);

About

This project is created using create-react-library, CLI for creating modern React libraries.

1.6.5

4 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.5

4 years ago

1.2.3

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.2.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago