Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.11 KB

COMPONENT_GUIDELINES.md

File metadata and controls

27 lines (23 loc) · 1.11 KB

General guidelines for React components

  • Test your component in the latest version of evergreen browsers

  • Use CSS grids for layout where appropriate

  • Write tests in Jest

  • Take time to learn from other design systems

  • Keep the component as simple as possible

  • Always get in touch with one of the lead developers before you start work on a component

  • Components issues labelled "storefront" have the highest priority

  • Remember to add code for :focus-visible.

    • The main goal is to distinguish between pointer events and keyboard navigation
    • To use in your component, add
    &:focus {
      outline: none;
    }
    
    &:focus-visible {
      outline: ${outline}; /** 1px dashed rgba(0, 112, 121, 1) */
      outline-offset: ${outlineOffset}; /** 2px */
    }