gatsby-interface
Component library for Gatsby projects
Last updated 6 years ago by elanhant .
ISC · Original npm
$ cnpm install gatsby-interface 
SYNC missed versions from official npm registry.
rebeccapurple dot

Gatsby Interface

Current npm package version. Downloads per month on npm. Total downloads on npm.

Storybook available at gatsby-interface.netlify.com:

screenshot

Installation

Using npm:

npm install gatsby-interface --save

Using Yarn:

yarn add gatsby-interface

Fonts

Certain Gatsby Interface components require the Futura PT webfont. These files are git-ignored to prevent the unauthorized release of licensed assets, and are not included in this repository.

Gatsby Inc. employees can download these fonts from our Google Drive. Put all those folders in src/assets/futura-pt and you should be good to go!

Development

  1. Clone the repository: git clone https://github.com/gatsby-inc/gatsby-interface.git.
  2. Install dependencies: yarn.
  3. Run Storybook: yarn storybook.

Adding a new component

If you want to add a new component to gatsby-interface, run yarn scaffold:component to create stubs:

yarn scaffold:component MyNewComponent

This script will do the following:

  • Create a MyNewComponent directory for the component at ./src/components
  • Generate a file for the component itself, MyNewComponent.tsx, with stubs for props type, styles and even some variants
  • Generate a story file, MyNewComponent.stories.tsx, which follows the suggestions from Component Checklist proposal.
  • Generate an index file, index.ts, which reexports everything from the component file
  • Add export statements to library index files: ./src/index.ts and ./index-ts-only.ts.

Everything that is generated should be working out of the box and be ready to shipped (though please avoid shipping the stubs ????)

Contributing

These are some patterns and best practices we use when contributing to gatsby-interface:

Chromatic testing

To run the visual testing tool, run CHROMATIC_APP_CODE=<insert_app_code> yarn chromatic

You can find the app code in the Chromatic dashboard - https://www.chromaticqa.com

❗ Code of Conduct

Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our Code of Conduct. Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. ????????

Current Tags

  • 0.0.59-tokens.15                                ...           dev (6 years ago)
  • 0.0.167                                ...           latest (5 years ago)
  • 0.0.59-next.4                                ...           next (6 years ago)
  • 0.0.60-beta1                                ...           pr-review (6 years ago)
  • 0.0.37-pricing.2                                ...           pricing (6 years ago)

9 Versions

  • 0.0.166                                ...           5 years ago
  • 0.0.286                                ...           3 years ago
  • 0.0.193                                ...           5 years ago
  • 0.0.163                                ...           5 years ago
  • 0.0.37-pricing.2                                ...           6 years ago
  • 0.0.60-beta1                                ...           6 years ago
  • 0.0.59-next.4                                ...           6 years ago
  • 0.0.59-tokens.15                                ...           6 years ago
  • 0.0.167                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (108)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org