JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q58605F
  • License MIT

Exposes common components to be re used in RIF projects

Package Exports

  • @rsksmart/rif-ui

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rsksmart/rif-ui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@rsksmart/rif-ui

This repository is a React library written in Typescript and based on Material-UI. It exposes common components, services and assets to be re used in RIF projects.

Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.

Install

For now you can add the dependency on the package.json file, pointing to this repo as below:

...,
"dependencies": {
  ...
  "@rsksmart/rif-ui": "github:rsksmart/rif-ui"
  ...
},
...

Usage

import React, { Component } from 'react'
import Typography from '@rsksmart/rif-ui'
import '@rsksmart/rif-ui/dist/index.css'

class Example extends Component {
  render() {
    return <Typography color='primary'>Hello world :)<Typography/>
  }
}

PageTemplate and Header components

Those components were created to work together. As the Header has a fixed position, we leave the same top space on PageTemplate as the Header's height.

Example folder

If you want to try this library without creating a new project you can clone this repo and follow the next steps:

  1. At rif-ui:
npm start
  1. In another terminal:
cd example/ && npm start
  1. (Optional) Import the components, assets or services that you want in the App.js file following the Usage section to see them in action.

License

MIT © rsksmart