npm.io
0.2.3 β€’ Published 2 years ago

zstyl

Licence
MIT
Version
0.2.3
Deps
0
Size
145 kB
Vulns
0
Weekly
24

.github/workflows/test.yml

zstyl

A CSS in JS framework like styled-component for zheleznaya.

how to use

import { h, render } from "zheleznaya";
import { styled } from "zstyl";

const Header = styled<{
  color: string;
}>`
  display: flex;
  justify-content: center;
  background: ${({ color }) => color}

  &:hover {
    background: #000;
  }

  div.inner {
    height: 200px;
    
    span {
      color: yellow;
    }
  }
  
  @media (max-width: 720px) {
    display: inline-flex;
  }
`;

render(
  <Header>
    <div class="inner">200px height</div>
  </Header>
);