inferno-styled-jsx

0.0.1 • Public • Published

inferno-styled-jsx

Write styled-jsx in Inferno.

Setup

npm install --save-dev iferno-styled-jsx

Configuring

In your babel config, configure styled-jsx as documented. Make sure that you configure styleModule='inferno-styled-jsx/style' as in the following example:

["styled-jsx/babel", { "optimizeForSpeed": true, "styleModule": "inferno-styled-jsx/style" }],

Example

function Example() {
  return (
    <div class="bigtext">
      Hi, there. I'm a large font.
      <style jsx>
        {`
          .bigtext {
            font-size: 5rem;
            color: green;
          }
        `}
      </style>
    </div>
  );
}

Package Sidebar

Install

npm i inferno-styled-jsx

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

3.6 kB

Total Files

4

Last publish

Collaborators

  • chrisdavies