# styled-chain

> styled-chain

Latest version **1.0.3** (published 2022-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install styled-chain
pnpm add styled-chain
yarn add styled-chain
bun add styled-chain
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-02-14 |
| First published | 2022-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fangyuchi |
| Maintainers | fangyuchi |

## Links

- npm: https://www.npmjs.com/package/styled-chain
- npm.io page: https://npm.io/package/styled-chain

## Dependencies (1)

- [styled-components](https://npm.io/package/styled-components.md) ^5.3.3

## Recent versions

- 1.0.3 (latest) — 2022-02-14
- 1.0.2 — 2022-02-13

## README

# styled-chain

use styled-components like this:

```tsx
const Div = styled.div.RedColor.Ellipsis({
  width: 100,
  height: 30,
  border: '1px solid'
});

<Div>
  12345678901234567890
</Div>
```

then you can get a component like below:

<img src="./example_1.png" width={200} />

## install

```
npm install styled-chain
```

## usage

1. register styles
   
```js
  import sc from 'styled-chain';

  // register some styles
  sc.register('RedColor', { color: 'red' });
  sc.register('Ellipsis', {
    overflow: 'hidden',
    whiteSpace: 'nowrap',
    textOverflow: 'ellipsis',
    wordBreak: 'keep-all'
  });

  // then use
  const Div = styled.div.RedColor.Ellipsis({
    width: 100,
    height: 30,
    border: '1px solid'
  });
```

---
_Source: https://npm.io/package/styled-chain · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
