albertfdp / react-components

:seedling: garden React components

Home Page:http://zendeskgarden.github.io/react-components/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Garden React Components Build Status Dependency Status

🌱 Garden is a design system for Zendesk

Garden React provides consistent behavior for Garden components. React components are maintained following a multi-package approach where components are packaged and published individually, but combined under this single repository. Components rely on Garden CSS for styling.

Installation

See the individual package README for the React component you would like to install.

Package Version Dependencies
@zendeskgarden/react-avatars npm version Dependency Status
@zendeskgarden/react-buttons npm version Dependency Status
@zendeskgarden/react-checkboxes npm version Dependency Status
@zendeskgarden/react-chrome npm version Dependency Status
@zendeskgarden/react-menus npm version Dependency Status
@zendeskgarden/react-modals npm version Dependency Status
@zendeskgarden/react-notifications npm version Dependency Status
@zendeskgarden/react-pagination npm version Dependency Status
@zendeskgarden/react-radios npm version Dependency Status
@zendeskgarden/react-ranges npm version Dependency Status
@zendeskgarden/react-select npm version Dependency Status
@zendeskgarden/react-selection npm version Dependency Status
@zendeskgarden/react-tabs npm version Dependency Status
@zendeskgarden/react-tags npm version Dependency Status
@zendeskgarden/react-textfields npm version Dependency Status
@zendeskgarden/react-theming npm version Dependency Status
@zendeskgarden/react-toggles npm version Dependency Status
@zendeskgarden/react-tooltips npm version Dependency Status

Usage

To consume our packages we require CSS-modules be enabled within your webpack config. This allows us to leverage the styling that currently exists within our CSS packages.

By not bundling the CSS with each package it ensures that tree-shaking is handled correctly with products that depend on the CSS for other, custom areas.

Webpack configuration

Use this configuration to enable CSS-modules globally.

// webpack >= 2.2.1
{
  test: /\.css$/,
  use: [
    'style-loader',
    {
      loader: 'css-loader',
      options: {
        modules: true,
        localIdentName: '[path][name]__[local]--[hash:base64:5]'
      }
    }
  ]
}

Limited Webpack Configuration

This configuration limits CSS-modules to the Garden React packages. Useful if you are already using global CSS within your application.

// webpack >= 2.2.1
{
  test: /\.css$/,
  include: /node_modules\/@zendeskgarden\/css/, // limits imports affected by loader
  use: [
    'style-loader',
    {
      loader: 'css-loader',
      options: {
        modules: true,
        localIdentName: '[path][name]__[local]--[hash:base64:5]'
      }
    }
  ]
}

Contribution

Thanks for your interest in Garden! Community involvement helps make our design system fresh and tasty for everyone.

Got issues with what you find here? Please feel free to create an issue.

If you'd like to take a crack at making some changes, please follow our contributing documentation for details needed to submit a PR.

Community behavior is benevolently ruled by a code of conduct. Please participate accordingly.

License

Copyright 2018 Zendesk

Licensed under the Apache License, Version 2.0

About

:seedling: garden React components

http://zendeskgarden.github.io/react-components/

License:Apache License 2.0


Languages

Language:JavaScript 99.7%Language:CSS 0.2%Language:Shell 0.1%