🧱 @c2fo/components
C2FO's shared TypeScript and React component library based on Material-UI
👋 If you’re new to TypeScript and React, checkout this cheatsheet
Using
Install via npm
$ npm i @c2fo/components --save
Import in your react and typescript app
import React from 'react'
import { Button } from '@c2fo/components'
interface TextButtonProps {
text: string;
}
const TextButton: React.FC<TextButtonProps> = props => {
return <Button>{props.text}</Button>
}
export default TextButton
Developing alongside your app
Alongside development is convenient, but requires you to edit dependencies in both @c2fo/components
and your app.
🧠 Remember you'll have to restore each project with the commands below to release or build your app remotely
Setup
$ npm un react react-dom --save-dev
$ npm link
$ cd ../my-app
$ npm un @c2fo/components --save
$ npm link @c2fo/components
Restore
$ npm unlink
$ npm i react react-dom --save-dev
$ cd ../my-app
$ npm unlink @c2fo/components
$ npm i @c2fo/components --save
Developing standalone
Start the playground to develop components without your app
$ npm run playground
Releasing
Please see the documentation under the doc
folder.
Publish to npm
Use np for an interactive walkthrough with validation and test running
$ np
Maintaining
🥾 This library was bootstrapped with TSDX
TODO: Doucment responsible teams/people and a process