Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

canonical-web-and-design/snapweb-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated and archived

We no longer use this, and it is no longer actively maintained.


snapweb-toolkit

Example

import React from 'react'
import ReactDOM from 'react-dom'
import { Button } from 'snapweb-toolkit'
import 'snapweb-toolkit/lib/bundle.css'

ReactDOM.render(
  <div>
    <Button label='Button' />
  </div>,
  document.getElementById('root')
)

Usage

Add the toolkit to your React project by adding snapweb-toolkit in your package.json dependencies field:

{
  "dependencies": {
    "snapweb-toolkit": "git://github.com/ubuntudesign/snapweb-toolkit.git#master"
  }
}

Import the toolkit CSS file:

import 'snapweb-toolkit/lib/bundle.css'

Import the components you need:

import { Button } from 'snapweb-toolkit'

How to develop

To develop the toolkit as you use it, you need to use the npm link command.

Clone the toolkit somewhere on your system:

git clone git@github.com:ubuntudesign/snapweb-toolkit.git

Link it globally, so you can use this version from anywhere on your system:

cd snapweb-toolkit
npm link

Link it in your project:

cd <YOUR_PROJECT_FOLDER>
npm link snapweb-toolkit

Run the watch script to recompile the changed files:

cd snapweb-toolkit
npm start

If you have a watch script in your project, launch it in another shell session, e.g.:

cd <YOUR_PROJECT_FOLDER>
npm start

By doing so, any change in the toolkit will trigger a rebuild, which will in turn trigger a rebuild in your own project.

About

A set of React components used by SnapWeb and related projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published