# Mila components

[![CircleCI](https://circleci.com/gh/milacom/mila-components.svg?style=svg&circle-token=3fe3cbfebdfcbced258ab92028da7277b7867eaf)](https://circleci.com/gh/milacom/mila-components)

This project provides a guide to design and build React components for mila.com.

## Technologies

- React
- Typescript
- CSS Modules
- PostCSS
- Jest / Enzyme

## Getting started

To install `mila-components` in your project, you will need to run the
following command using [npm](https://www.npmjs.com/):

```bash
npm install -S @milacom/mila-components
```

If you prefer [Yarn](https://yarnpkg.com/en/), use the following
command instead:

```bash
yarn add @milacom/mila-components
```

## Development

```bash
npm run watch
```

Link the package in you project if you want to work parallel

```bash
npm link "@milacom/mila-components"
```

If you have problems with different react version, link react package back to your frontend

```bash
npm link ../mila-frontend/node_modules/react
```

### Redesign
Grid is built with https://www.postcss-mesh.org/
Use mila instead of mesh as name 

Grid is in the style.css. Built the grid system again after changes.
```
npm run watch:grid
```

## Build

```bash
npm run build
```

## Release

Create a new version tag and circleci will create a new npm release

Add new version to package.json

```bash
npm version <newversion>
git push --tags origin master
```
