# @daisypayments/petals

> Reusable front end components to be used across Daisy Payments

Latest version **0.2.3** (published 2020-03-26) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @daisypayments/petals
pnpm add @daisypayments/petals
yarn add @daisypayments/petals
bun add @daisypayments/petals
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2020-03-26 |
| First published | 2019-07-01 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 316.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luke Loreti |
| Maintainers | jmoreira, lopezjurip, nchastain, sloreti, vdrg, wachunei |

## Links

- npm: https://www.npmjs.com/package/@daisypayments/petals
- Repository: https://github.com/consensys/daisy-petals
- Homepage: https://github.com/consensys/daisy-petals#readme
- Issues: https://github.com/consensys/daisy-petals/issues
- npm.io page: https://npm.io/package/@daisypayments/petals

## Dependencies (2)

- [react-jazzicon](https://npm.io/package/react-jazzicon.md) ^0.1.3
- [react-copy-to-clipboard](https://npm.io/package/react-copy-to-clipboard.md) ^5.0.1

## Recent versions

- 0.2.3 (latest) — 2020-03-26
- 0.2.2 — 2020-03-17
- 0.2.1 — 2020-03-13
- 0.2.0 — 2020-01-31
- 0.1.50 — 2020-01-20
- 0.1.49 — 2020-01-07
- 0.1.48 — 2020-01-03
- 0.1.47 — 2019-12-11
- 0.1.46 — 2019-11-22
- 0.1.45 — 2019-11-13
- 0.1.44 — 2019-11-07
- 0.1.43 — 2019-10-30
- 0.1.42 — 2019-10-23
- 0.1.41 — 2019-10-21
- 0.1.40 — 2019-10-01
- … 11 more at https://npm.io/package/@daisypayments/petals/versions

## README

# @daisypayments/petals

Reusable UI Components to be used across Daisy Payments

## Dependencies

Run `yarn install` to install depencencies.

## Usage

Add this to your project by running:

```sh
yarn add @daisypayments/petals
```

Add peer dependencies:

```sh
yarn add lodash polished prop-types react-media styled-components
```

## Development

We are using storybook as a UI development environment. Open storybook by running:

```sh
yarn storybook
```

It should open automatically at [http://localhost:6006](http://localhost:6006).

## Local development along other projects

To add this package as a local dependency in your local projects we use [yalc](https://github.com/whitecolor/yalc).

> **Why yalc?** Take a look a this issue: [_"yarn knit": a better "yarn link" #1213_](https://github.com/yarnpkg/yarn/issues/1213)

In short words: yalc makes a copy of this package as it was published into a npm registry, avoiding the usage of `yarn link` which creates a _symlink_ including source files and `node_modules` leading to multiple dependencies being used in the development environment.

### Steps

Follow these steps to use `@daisypayments/petals` in another `frontend-project` package:

- Install `yalc` cli tool globally by running:

  ```sh
  yarn global add yalc
  ```

<<<<<<< Updated upstream
- Publish `@daisypayments/petals` to your local `~/.yalc` folder by running in `@daisypayments/petals` folder:

  ```sh
  yalc publish
  ```

- Go to `frontend-project` folder and link `@daisypayments/petals` published version:

  ```sh
  yalc link @daisypayments/petals
  ```

  Run `yarn install` to install dependencies, then add `.yalc/` and `yalc.lock` to `frontend-project`'s `.gitignore`

- **Publish changes and update linked installations** of `@daisypayments/petals` by running in its folder:

  ```sh
  yarn push # equivalent to `yarn build && yalc push`
  ```

  To do this automatically when files change in `src/` folder run:

  ```sh
  yarn dev # equivalent to `nodemon --watch src --exec yarn push`
  ```

### Caveats

- `yalc link @daisypayments/petals` will leave a symlink inside `node_modules`, if you ever want to go back to the version downloaded from npm, remove it and install it again.
- Some projects need to recompile: since components are being imported from `node_modules` they will be cached by bundlers and changes won't be reflected right away.

## Publishing to NPM

- Once your PR has been approved, squash and merge the feature branch into `develop`.

- Locally, checkout `develop`, pull, and increment the version of the package:

  ```sh
  git checkout develop
  git pull
  yarn version
  ```

- Push the updated `develop` branch and the associated tag:

  ```sh
  git push
  git push origin <new_tag_name>
  ```

- Create a new PR to merge `develop` into `master` with a title following the format
  "Master < Develop <new_tag_name>"

- Once the team approves, merge the PR (normally, without squashing or rebasing). CircleCI will automatically publish to NPM if all tests pass. Always verify that everything worked here and on [npm](https://www.npmjs.com/package/@daisypayments/petals).

---
_Source: https://npm.io/package/@daisypayments/petals · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
