preact-emotion

The Next Generation of CSS-in-JS, for Preact projects.

MIT 56 个版本
安装
npm install preact-emotion
yarn add preact-emotion
pnpm add preact-emotion
bun add preact-emotion
README

preact-emotion

The styled API for emotion and preact

preact-emotion exports styled which allows you to use emotion to create Preact components that have styles attached to them, it also exports all of emotion's exports.

For more documentation on styled, read about it and try it out in the styled docs

npm install --save emotion preact-emotion
// @live
import styled, { css } from 'preact-emotion'
const SomeComponent = styled('div')`
  display: flex;
  background-color: ${props => props.color};
`

const AnotherComponent = styled('h1')(
  {
    color: 'hotpink'
  },
  props => ({ flex: props.flex })
)

render(
  <SomeComponent color="#DA70D6">
    <AnotherComponent flex={1}>Some text.</AnotherComponent>
  </SomeComponent>
)
版本列表
9.2.12 2018-09-30
9.2.11 2018-09-30
9.2.10 2018-09-19
9.2.9 2018-09-16
9.2.8 2018-08-28
9.2.6 2018-07-15
9.2.5 2018-07-06
9.2.4 2018-06-21
9.2.3 2018-06-09
9.2.1 2018-06-07
9.2.0 2018-06-07
9.1.3 2018-05-07
9.1.2 2018-04-17
9.1.1 2018-04-04
9.1.0 2018-03-23
9.0.2 2018-02-22
9.0.1 2018-02-13
9.0.0-3 2018-02-03
9.0.0-2 2018-01-16
9.0.0-1 2017-12-23
9.0.0-0 2017-12-23
9.0.0 2018-02-04
8.0.12 2017-11-30
8.0.11 2017-11-24
8.0.10 2017-11-07
8.0.9 2017-10-23
8.0.8 2017-10-16
8.0.7 2017-10-16
8.0.6 2017-10-14
8.0.5 2017-10-08
8.0.4 2017-10-07
8.0.3 2017-10-06
8.0.2-13 2017-10-01
8.0.2-12 2017-09-30
8.0.2-11 2017-09-30
8.0.2-10 2017-09-29
8.0.2-9 2017-09-27
8.0.2-8 2017-09-27
8.0.2-7 2017-09-26
8.0.2-6 2017-09-25
8.0.2-5 2017-09-24
8.0.2-3 2017-09-22
8.0.2-2 2017-09-22
8.0.2-1 2017-09-21
8.0.2-0 2017-09-20
8.0.2 2017-10-05
8.0.1-0 2017-09-20
8.0.0-0 2017-09-20
7.3.2 2017-09-14
7.3.1 2017-09-13
7.3.0 2017-09-13
7.2.2 2017-09-05
7.2.0 2017-08-20