Giter VIP home page Giter VIP logo

rb-components's Introduction

React-Bootstrap Components

Project-agnostic component sets used with react-bootstrap.

Usage

Like other components of react-bootstrap, package consumers should directly require or import components in the lib directory.

import IconButton from '@smikitky/rb-components/lib/IconButton';

These are written in ES2015 with object-rest-spread, so you'll need to transpile them using Babel or TypeScript set up for your project. Scripts in node_modules are often configured to be ignored, so you may have to specify that scripts under @smikitky/rb-components should be transpiled.

Aliasing to the rb-components/lib is also a good idea.

Therefore your webpack.config.js would look like this:

loaders: [{
  test: t => (/\.jsx?/.test(t) && (/rb-components/.test(t) || !/node_modules/.test(t))),
  loader: 'babel-loader',
  query: {
    presets: ['es2015', 'react'],
    plugins: ['transform-object-rest-spread']
  }
}],
resolve: {
  modules: ['front-ui'],
  alias: { rb: '@smikitky/rb-components/lib' },
}

Polyfill scripts (like Promises) are not included. You should provide your own polyfills if necessary.

Requirements

The followings should be manually enabled in your project:

  • Font Awesome (CSS, optional)
  • Bootstrap (CSS Only)

These packages are marked as dependencies. These will not be included in your final bundle unless you actually use the relevant components.

  • classnames
  • moment
  • tinycolor2

Demo

A small demo app is available via webpack-dev-server.

npm start

Note

This package is basically intended for internal use only.

License

MIT

rb-components's People

Contributors

smikitky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.