Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/romellogoodman/styled-inline-components

Inline style system for styled-components
https://github.com/romellogoodman/styled-inline-components

cssinjs react styled-components

Last synced: 11 days ago
JSON representation

Inline style system for styled-components

Awesome Lists containing this project

README

        

# styled-inline-components
Inline style system for styled-components

[![npm](https://img.shields.io/npm/v/styled-inline-components.svg)](https://www.npmjs.com/package/styled-inline-components)

### Install
```
npm install styled-inline-components styled-components
```

## Usage

```js
import React from 'react';
import Elements from 'styled-inline-components';

const {Div, P} = Elements;

const Component = () => {
return (


Hello World



);
};
```

Any dom element that styled-components [recognizes as valid](https://github.com/styled-components/styled-components/blob/master/src/utils/domElements.js̨) can be used. To require it, capitalize the first letter of the element.

For example:

| Tag | Component |
|:--------|:----------|
| div | Div |
| p | P |
| section | Section |

## Why?

Inspired by a [styled-components spectrum thread](https://spectrum.chat/thread/014f7053-e24a-4891-a633-4065e91f3bf8).