c-patterns

1.1.4 • Public • Published

Patterns npm version NPM BUILD

The Content Program Patterns library for React and Javascript components and resusable code

Contributing and releasing

Releasing

Update the package.json file with an incremental increase of the package version on the master branch. Once the unit tests and linting have been successful, the package will be published to npmjs.com.

Install

npm

npm install --save c-patterns

yarn

yarn add c-patterns

Usage

ES6

import { Button, FileUpload } from 'c-patterns';
 
render() {
  return (
    <div>
      <Button />
      <FileUpload />
    <div>
  )
}

also to reduce file size, you can require individual components:

import Button from 'c-patterns/dist/Button';
render() {
  return (
            <div>
                <Button />
            <div>
        )
    }

ES5

const Cpatterns = require('c-patterns');
const Button = Cpatterns.Button;
const FileUpload = Cpatterns.FileUpload;
 
render() {
    return (
    <div>
      <Button />
      <FileUpload />
    <div>)
}

Readme

Keywords

none

Package Sidebar

Install

npm i c-patterns

Weekly Downloads

1

Version

1.1.4

License

MIT

Unpacked Size

2.33 MB

Total Files

37

Last publish

Collaborators

  • c-patterns
  • sabeurthabti