2.0.0-alpha.9 • Published 4 months ago

@compassion-design-system/react v2.0.0-alpha.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

GDS React Components

The Compassion Design System includes a streamlined set of React components for fast, accessible development of apps and static sites.

Installing and usage

To install the GDS React package use

npm install @compassion-design-system/react

Or yarn add @compassion-design-system/react if you're using yarn

Import the following css files from the entry point of your application

index.js

// Replace {theme} with any of the available themes (e.g. light, dark)
import '@compassion-design-system/react/css/base.css';
import '@compassion-design-system/react/css/{theme}.css';

GDS React components would follow the imported theme.

Sample component usage:

import React from 'react';
import { Button } from '@compassion-design-system/react';

export const PrimaryButton = (props) => (
  <Button primary size="small" {...props} />
);

Themes

Available options:

  • light: @compassion-design-system/react/css/light.css
  • dark: @compassion-design-system/react/css/dark.css

Contributing to the react Package

The react package is structured with a component-per-directory convention inside the src directory. Each component directory generally contains 3 items:

  • A TSX file that describes the component’s structure and behavior
  • A .stories.ts file that illustrates most of the ways the component can be configured
  • An index.ts file that exports the TSX component’s contents
2.0.0-alpha.9

4 months ago

2.0.0-alpha.8

6 months ago

2.0.0-alpha.7

7 months ago

2.0.0-alpha.6

8 months ago

2.0.0-alpha.5

8 months ago

2.0.0-alpha.4

8 months ago

2.0.0-alpha.3

8 months ago

2.0.0-alpha.2

8 months ago

2.0.0-alpha.1

9 months ago

2.0.0-alpha.0

9 months ago

1.0.0

10 months ago