Skip to content

Usage

To use RADES in your app:

Install rades_react with npm. Make sure you also have all peerDependencies installed.

npm install --save git+ssh://git@bitbucket.org:extraordinary/rades_react.git#<desired_commit_hash>

⚠️ The following documentation step needs to be reviewed: ⚠️

Load the default theme and the CSS foundation layer:

import 'rades_react/src/theme.scss';
import 'rades_react/src/foundation.scss';
import 'rades_react/src/helpers.scss';

Import and use any of RADES components in your app:

import { Icon } from 'rades_react';

<Icon icon="bin" />

If using jest make sure not to transform RADES components by babel in test scenarios by adding to jest.config.js:

transformIgnorePatterns: [
  'node_modules/(?!rades_react)'
]

If using webpack make sure not to transform RADES components by babel using correctly configured loader in webpack.config.babel.js:

{
  exclude: /node_modules\/(?!rades_react)/,
  test: /\.(js|jsx)$/,
  use: [{ loader: 'babel-loader' }],
}