react-biz
v1.0.60
Published
React components for Business
Downloads
75
Maintainers
Readme
React Biz
Этот проект делается для бизнес-приложений. Сделано для бизнеса:
- Постраничная навигация для таблицы.
- Сортировка колонок в таблице.
- Autosuggest, компонент позволяет работать с удаленным запросом
Installation
React Biz can be installed as an npm package;
npm install --save react-biz
Usage
Although there are other ways to use React Biz, the recommended way is to create a webpack workflow with babel-loader, css-loader and sass-loader. A good starting point is React Hot Webpack Boilerplate.
Once you have the workflow ready, you can just require and use the components:
import React from 'react';
import Button from 'react-biz/lib/button';
const CustomButton = () => (
<Button label="Hello world" raised accent />
);
export default CustomButton;
The previous code creates a React button component based on React Toolbox button. It's important to notice that requiring a module from the exposed root of the package will also import the SASS of the component.
Roboto Font and Material Design Icons
React Toolbox assumes that you are importing Roboto Font and Material Design Icons.
In order to import the fonts for you, we'd need to include them in the CSS which is considered a bad practice. If you are not including them in your app, go to the linked sites and follow the instructions.
App component
There are some components in React Toolbox that require special positioning. For example, Dialog
and Drawer
components block the scroll showing a fixed positioned overlay. To handle these cases, React Toolbox needs some styling in your root node. This can be achieved by wrapping your app with a non intrusive App
wrapper component:
import React from 'react';
import ReactDOM from 'react-dom';
import ToolboxApp from 'react-toolbox/lib/app';
import App from './my-app';
ReactDOM.render(
<ToolboxApp>
<App />
</ToolboxApp>
, document.getElementById('app'));