@ronin/style

1.0.2 • Public • Published

style

HOC to write react component with Style

Demo

https://codesandbox.io/s/6l0mkwk79n

Install

$ yarn add @ronin/style

Usage

import Style from '@ronin/style';

const App = () => <div className="App">
  <Style color="red" fontWeight="bold">
    <h1>I'm so Stylish</h1>
  </Style>
</div>

This will output:

    <div class="App">
      <h1 style="color: red; font-weight: bold;">I'm so Stylish</h1>
    </div>

You can also Style text, it will wrap them with span element by default. You can pass tag prop with the you want instead:

<Style tag="p" color="red">I'm a stylish text</Style>

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @ronin/style

    Weekly Downloads

    1

    Version

    1.0.2

    License

    Unlicensed

    Unpacked Size

    102 kB

    Total Files

    8

    Last publish

    Collaborators

    • alon