# @jalba/react-css-doodle

> A simple [styled-components](https://styled-components.com/)-esque wrapper for [css-doodle](https://css-doodle.com/) library.

Latest version **1.3.0** (published 2021-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jalba/react-css-doodle
pnpm add @jalba/react-css-doodle
yarn add @jalba/react-css-doodle
bun add @jalba/react-css-doodle
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2021-03-22 |
| First published | 2021-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 207.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Javier Alba |
| Maintainers | jalba |
| Keywords | react, css-doodle, styled-components |

## Links

- npm: https://www.npmjs.com/package/@jalba/react-css-doodle
- Homepage: https://github.com/jalba/react-css-doodle#readme
- Issues: https://github.com/jalba/react-css-doodle/issues
- npm.io page: https://npm.io/package/@jalba/react-css-doodle

## Dependencies (1)

- [css-doodle](https://npm.io/package/css-doodle.md) ^0.14.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2021-03-22
- 1.2.0 — 2021-03-22
- 1.1.0 — 2021-03-21
- 1.0.1 — 2021-03-21
- 1.0.0 — 2021-03-21
- 0.1.2 — 2021-03-01
- 0.1.1 — 2021-03-01
- 0.1.0 — 2021-02-28

## README

# REACT-CSS-DOODLE

A simple [styled-components](https://styled-components.com/)-esque wrapper for [css-doodle](https://css-doodle.com/) library.

## installation

`npm install -S @jalba/react-css-doodle` or `yarn add @jalba/react-css-doodle`

## usage

You can pass variables and even functions to the [tagged template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) to build your doodle's rules:

```javascript
import React from "react";
import "./styles.css";

import doodle from "./doodle";

const gridSize = 2;
const gridGap = "2";

const background = () => "red";

const FancyDoodle = doodle`
  :doodle {
    @grid: ${gridSize} / 200px;
    grid-gap: ${gridGap}px;
  }
  background: @pick(${background}, pink);
`;

export default function App() {
  return (
    <div className="App">
      <FancyDoodle />
    </div>
  );
}
```


![alt text](https://github.com/jalba/react-css-doodle/raw/master/assets/doodle.png "The result")


## Available Scripts

In the project directory, you can run:

### `yarn run storybook`

Runs storybook. Ideal to develop or play around with the possibilities of `css-doodle`\
Open [http://localhost:6006](http://localhost:6006) to view it in the browser.

The page will reload if you make edits.

### `yarn test`

Launches the test runner in the interactive watch mode\
Visit [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the library for production to the `dist` folder.\

The build task uses rollup as bundler.

There is also an interactive mode, that will re-build the library after every change you save.

Run it with `yarn run build-watch`

Please visit [rollup](https://rollupjs.org/guide/en/) for more information

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