Skip to content
forked from strapi/buffet

Buffet.js — React Components Library made with styled-components

Notifications You must be signed in to change notification settings

sargreal/buffet

 
 

Repository files navigation



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/core @buffetjs/hooks  @buffetjs/styles
# Install the required dependencies
yarn add lodash prop-types react react-dom react-router-dom styled-components

or npm

npm install @buffetjs/core @buffetjs/styles @buffetjs/hooks --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/core';

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.

About

Buffet.js — React Components Library made with styled-components

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.5%
  • CSS 5.5%