0.0.1 • Published 6 years ago

resandbox v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

resandbox

yarn add resandbox

Book.js

import React from 'react'
import withSandbox, { Types } from 'resandbox'

const Book = ({title, author}) =>
  <div className='book'>
    <div className='title'>{title}</div>
    <div className='author'>{author}</div>
    <div className='year'>{year}</div>
  </div>

const BookSandbox = withSandbox(Book, {
  title: Types.String('My HOC', 'Title of the book'),
  author: Types.String('Celio', 'Author of the book'),
  year: Types.Number(2017, 'Year of the book'),
})

export default Book
export BookSandbox