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

adjustable

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adjustable

A helper to support Tailwind-style utilities for CSS-in-JS

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

adjustable

NOTE: This is not ready for production.

Adjustable is a helper to support Tailwind-style utilities for CSS-in-JS.

Install

yarn add adjustable

Use

import { Adjustable, Adjustment } from "./adjust";
import config from "./config";

const Heading = props => <Adjustment {...props} />;
const H1 = props => <Heading as="h1" css={{ fontSize: 24 }} {...props} />;
const H2 = props => <Heading as="h2" css={{ fontSize: 16 }} {...props} />;

function App() {
  return (
    <Adjustable config={config}>
      <H1 adjust="fg-teal">Teal colored text</H1>
      <H2 adjust="ta-center pb-2 pt-2">
        Centered text with padding top and bottom
      </H2>
    </Adjustable>
  );
}

Config

const colors = {
  ...
  teal: "#4dc0b5",
};

const spacing = ["0", "0.5rem", "1rem", "1.5rem", "2rem"];

export default {
	...
  backgroundColors: colors,
  borderRadius: [0, "0.125rem", "0.25rem", "0.5rem", "50%"],
  fontWeight: [300, 400, 700],
  leading: [1, 1.25, 1.5, 2],
  margin: spacing,
  padding: spacing,
  textColors: colors,
  tracking: ["-0.05em", "0", "0.05em"],
  zIndex: [0, 100, 200, 300, 400, 500]
};

FAQs

Package last updated on 20 Feb 2019

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