0.1.27 • Published 5 years ago

styled-stencil v0.1.27

Weekly downloads
93
License
-
Repository
github
Last release
5 years ago

💅 – Styled Stencils – A library for your web components

A Styled Components like library for StencilJS


Build Status Maintainability dependencies Status npm version

Intro

This project is meant to handle fast production and easy maintenance, this is not an overall solution is a way for us for fasten our work and grant quality during all the development project.

Contributions and feedbacks are welcome.

What it does

Basically it gives you the flexibility of CSS in the power engine of JS. Helps keep clean your code and avoid spaghetti code and css files long like script rolls.

Install

yarn add styled-stencil

or if you have time to spare

npm install styled-stencil

Example

Use your styled components in JSX as you would have done with normal components

import {Component} from '@stencil/core';
import styled from 'styled-stencil';

const Background = styled.section`
  padding: 4em;
  background: papayawhip;
`;

const Title = styled.h1`
  font-size: 1.5em;
  text-align: center;
  color: ${(props) => props.color};
`;

@Component({
  tag: 'my-component'
})
export class MyComponent {
  render() {
    return (
      <Background>
        <Title color="palevioletred">Hello World, this is my first styled component!</Title>
      </Background>
    );
  }
}

And here the result you'll se on page. Same as styled-components 😉

npm.io

Requirements

  • Node >= 10.1

Author

Acknowledgments

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago