0.0.24 • Published 9 years ago

@dfrankland/inferno-mark v0.0.24

Weekly downloads
1
License
MIT
Repository
github
Last release
9 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

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago