1.0.7 • Published 1 year ago

@syfxlin/styops v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Styops

@syfxlin/styops is an extension library for the styled ecosystem, designed to provide a unified theme variable, similar to open-props.

Installation

# NPM
npm i @syfxlin/styops
# Yarn
yarn add @syfxlin/styops
# PNPM
pnpm add @syfxlin/styops

Usage

import { styled } from "@linaria/atomic or any css in js library";
import { createVars, style, tokens } from "@syfxlin/styops";

const vars1 = createVars();

export const Component1 = styled.div`
  color: ${vars1.c("blue1")};
  width: ${vars1.s("xs")};
  height: ${vars1.s(10)};
`;

const shortcut = style({
  key: ["width"],
  css: (value: string) => {
    return `width: ${value};`;
  },
});

const vars2 = createVars({ ...tokens, shortcut });

export const Component2 = styled.div`
  ${vars2.width("10px")}

  ${vars2.up("xl")} {
    ${vars2.width("20px")}
  }
`;

Maintainer

@syfxlin/styops is written and maintained with the help of Otstar Lin and the following contributors.

License

Released under the MIT License.

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago