Giter Club home page Giter Club logo

react-components's Introduction

Dotkom react-components

This is a collection of reusable react components.

How to use

Install the package npm install @dotkomonline/react-components.

Import a component directly

import { Button } from 'package/Buttons'

or import the whole package and use what you want

import { Button } from 'package'

Example build config

As any React project, using these components requires transpiling them. Look up babel and webpack for a simple start: https://babeljs.io/docs/plugins/transform-react-jsx/

For some examples check out the ones in use for storybook:

Sometimes node_modules will be ignored from webpack transpiling, and if that's the case this package has to be excepted from that exclude.

If using an exclude-clause, add this matching rule to exclude @dotkomonline/react-components from being excluded (double negatives are fun, right?)

exclude: /node_modules(?!\/@dotkomonline\/react-components)

CSS

Components use CSS modules for styling. This requires the webpack-config to use css-loader (for development use it's smart to use style-loader for hot-reloading).

Images

Some components uses images. These images are imported by the javascript code using ES6 import statements and they can be used in an HTML element like so: <img src={imageSource} />. Depending on the transpiler, these resources can be imported inline as base64 strings or URIs.

Some suggestions for webpack loaders to use:

Release new version

Read npm version and npm publish for how to release. Log in to dotkomuser.

We follow semantic versioning, so make sure you bump the correct version when bumping.

react-components's People

Contributors

sklirg avatar

Stargazers

August Sollesnes Solvang avatar

Watchers

Kristoffer Dalby avatar James Cloos avatar Torjus Iveland avatar Christian Strand Young avatar Thomas Mathisen avatar Kristian avatar William Tallis Falch avatar Herman Henriksen avatar  avatar  avatar Katrine avatar Niklas Molnes Hole avatar  avatar Dora Oline Eriksrud avatar Anders Larsen avatar  avatar  avatar

react-components's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.