Skip to content
Buffet.js — React Components Library made with styled-components
Branch: master
Clone or download
Latest commit e58d7f0 Jul 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
buffet Add table Jul 8, 2019
website fix meta image Jun 21, 2019
.gitignore Resolve conflicts May 13, 2019
.travis.yml Remove build from travis Jun 3, 2019
README.md Restore slack badge Jun 22, 2019
package.json Add root scripts Jun 17, 2019

README.md



React Components Library made with styled-components

Monthly download on NPM Travis Build Status Strapi on Slack

Getting Started

Installation

Using yarn

yarn add buffetjs
# Install the required dependencies
yarn add lodash prop-types react react-dom react-router-dom styled-components

or npm

npm install buffetjs --save
# Install the required dependencies
npm install lodash prop-types react react-dom react-router-dom styled-components --save

Example

Import buffet.js into your project as follows:

import React from 'react';
import {
  Enumeration,
} from 'buffetjs';

const Page = () => {
  const [state, setState] = React.useState('milk');

  return (
    <header>
      <p>Title</p>
    </header>
    <section>
      <Enumeration
        name="enumeration"
        onChange={({ target: { value } }) => setState(value)}
        options={[
          {
            value: 'flour',
            label: 'Flour',
          },
          {
            value: 'milk',
            label: 'Milk',
          },
          {
            value: 'butter',
            label: 'Butter',
          },
        ]}
        value={state}
      />
    </section>
    <footer>
      Made with love by Strapi
    </footer>
  );
}

export default Page;

Documentation

See the documentation at buffetjs.io/storybook for more informations.

You can’t perform that action at this time.