Clever/components

Name: components

Owner: Clever

Description: Frontend components

Created: 2015-11-16 23:47:29.0

Updated: 2018-05-02 19:00:08.0

Pushed: 2018-05-05 05:20:56.0

Homepage: http://clever.github.io/components/

Size: 10420

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Clever Design System

Check out documentation and live examples for Dewey, as well as our getting starting guide.

Development
Adding a new component

The following command will create a new component shell in src/MyNewComponent/ along with a starter test file and demo boilerplate:

n/new_component.sh MyNewComponent

You can also create additional sub-components in any existing directory by running:

n/new_sub_component.sh MyNewSubComponent ./src/MyNewComponent

You can then modify the component and demo code as needed. Your new component can be viewed at http://localhost:5010/#/components/my-new-component while the demo server is running.

Adding new SVGs

We use SVGs as JSX components for Icons, following this process:

  1. Optimize the svg at svgomg
  2. Make it React compatible with double quotes option at svg2jsx
  3. Prefix DOM Ids and classnames with component name if necessary
  4. Add it to the code:
    • Create a new file in src/Icon/icons/<<NewIcon>>.jsx
    • Add to src/Icon/icons/index.jsx and src/Icon/Icon.jsx
Running the demo server locally

Start up the demo server by running

 dev-server

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.