0.0.24 • Published 7 years ago

@dfrankland/inferno-mark v0.0.24

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

inferno-mark

Create mark(up/down) components similar to styled-components.

npm install --save inferno-mark

Usage

Basic

This creates two inferno components, <Title> and <Menu>:

import Inferno from 'inferno';
import mark from 'inferno-mark';

const Title = mark.down`
  # Hello World, this is my first markup component!
`;

const Menu = mark.up`
  <ul>
    <li><a href="/">Home</a></li>
    <li><a href="https://github.com/dfrankland">Github</a></li>
  </ul>
`;

You render them like so:

// Add style to the wrapping element
<Title style={{ color: red }} />

// Add a class `link` to all `<a></a>` tags.`
<Menu
  infernoMarkOptions={{
    components: {
      a: ({ children, ...props}) => <a {...props} className="link">{children}</a>,
    }
  }}
/>
0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago