lekplats

0.4.3 • Public • Published

Build Status npm version

Npm package to render a playground of React components.

Usage

The biggest difference between existing solutions is that this is just a React component.

yarn add --dev lekplats

Then render it passing a list of components with their fixtures:

import React from 'react'
import { render } from 'react-dom'
import Lekplats from 'lekplats'
import MyComponent from './components/MyComponent'
 
render(
  <Lekplats components={{
    Demo: {
      Component: MyComponent,
      fixtures: {
        'Swedish citizen': {
          name: {
            first: 'Sven',
            last: 'Svensson'
          },
          rolling: false
        },
        'Rolling Brasilian citizen': {
          name: {
            first: 'João',
            last: 'Silva'
          },
          rolling: true
        }
      }
    }
  }} />,
  document.getElementById('root')
)

Readme

Keywords

none

Package Sidebar

Install

npm i lekplats

Weekly Downloads

3

Version

0.4.3

License

SEE LICENSE IN LICENSE

Unpacked Size

1.65 MB

Total Files

9

Last publish

Collaborators

  • deschtex
  • jonotrujillo
  • pirelenito
  • xaviervia