Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jalba/react-css-doodle

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jalba/react-css-doodle

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

  • 1.3.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

REACT-CSS-DOODLE

A simple styled-components-esque wrapper for css-doodle 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 to build your doodle's rules:

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

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 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 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 for more information

Keywords

FAQs

Package last updated on 22 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc