4.6.0 • Published 4 months ago

@map-colonies/react-components v4.6.0

Weekly downloads
15
License
MIT
Repository
-
Last release
4 months ago

react-components

This is a library contains react components for use by other apps. All the components are written using typescript. The project was bootstrapped using create-react-app, and modified to enable exporting of components.

Using the package

  • Run yarn run build. This will compile the src/lib folder, and copy all the other files into the dist folder.
  • Add the package as a dependency to your project.
  • Import the required component, and use it in your code.

Developing new components

  • Create a new folder for your component under src/lib.
  • Develop your component (you can use src/index.tsx with yarn start to help you in the process).
  • Import the component into src/lib/index.ts.
  • Rebuild the package using yarn run build.
  • Use the new component in different apps.

Static resources (assets) handling

CESIUM assets (js, css) are not part of the package. react-components provides a declarative way to use cesium maps.

Make sure you include an CESIUM static assest in your appilcation!

You can use any one you want, but Google's Material Icons are available through open source. https://google.github.io/material-design-icons/

Self hosted solution

  • Copy relevant assets to your public folder.
    cesium npm module is a npm dependency.
    For exmaple you can add to your package.json following script:
    ```json
    "scripts": {
        "copyassets:cesium": "copyfiles -u 3 \"./node_modules/cesium/Build/Cesium/**/*\" \"./public\"",
    }
    ```
  • Load the assests in your app entry point(index.html).
    For exmaple you can add it in head section of your index.html:
    <head>
        <link rel="stylesheet" href="%PUBLIC_URL%/Cesium/Widgets/widgets.css" />
        <script src="%PUBLIC_URL%/Cesium/Cesium.js"></script>
    </head>

Other solution how to integrate assets to you code

4.6.0

4 months ago

4.4.1

7 months ago

4.4.0

7 months ago

4.2.2

7 months ago

4.4.2

6 months ago

4.0.1

10 months ago

4.2.1

7 months ago

4.0.3

10 months ago

4.2.0

7 months ago

4.0.2

10 months ago

4.5.0

6 months ago

4.3.1

7 months ago

4.1.3

7 months ago

4.1.0

9 months ago

4.3.0

7 months ago

4.1.2

7 months ago

4.1.1

9 months ago

3.15.0

11 months ago

3.15.1

11 months ago

3.14.0

1 year ago

3.13.1

1 year ago

3.13.0

1 year ago

3.12.3

2 years ago

3.12.2

2 years ago

3.12.0

2 years ago

3.10.5

2 years ago

3.11.0

2 years ago

3.10.4

2 years ago

3.9.0

2 years ago

3.8.1

2 years ago

3.10.1

2 years ago

3.10.0

2 years ago

3.10.3

2 years ago

3.10.2

2 years ago

3.8.0

2 years ago

3.7.4

3 years ago

3.7.3

3 years ago

3.7.2

3 years ago

3.7.0

3 years ago

3.6.5

3 years ago

3.6.4

3 years ago

3.6.2

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.6.3

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.6

3 years ago

3.3.5

3 years ago

3.3.4

3 years ago

3.3.3

3 years ago

3.3.2

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.2

3 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

0.1.2

4 years ago