No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Usage

Relements elements are all self contained elements with their own styles. When used in conjunction with Webpack, they can individually imported and used.

We provide an optional Provider element to provide some basic theme options such as primaryColor etc.

Using elements

All the elements can be individually imported and used.

import React from 'react'
import Button from 'relements/UI/Button'

function App() {
  return <Button type={Button.TYPES.PRIMARY}> Hello, World! </Button>
}

Output

Show Code

Using the Provider

The Provider must wrap your application at the root level. It provides the components with some configuration data using the React Context API.

import React from 'react'
import Provider from 'relements/core/Provider'

function App() {
  return (
    <Provider config={{ primaryColor: '#F00000' }}>
      <MyApp/>
    </Provider>
  )
}

Configuration Options