Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Update compositor.json via compositor.io
  • Loading branch information
jxnblk committed Aug 30, 2016
1 parent 4227559 commit d343d38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compositor.json
Expand Up @@ -66,7 +66,7 @@
"metadata": {
"source": "github.readme"
},
"html": "\n<p><img src=\"https://cloud.githubusercontent.com/assets/3451712/16896009/c90f18f0-4b54-11e6-81e3-dbde27b3fcb0.png\" alt=\"h0\"></p>\n<p>Hyperminimal functional DOM element microlibrary</p>\n<p><a href=\"https://travis-ci.org/jxnblk/h0\"><img src=\"https://travis-ci.org/jxnblk/h0.svg?branch=master\" alt=\"Build Status\"></a></p>\n<p><strong>Experimental</strong></p>\n<pre>npm i h0</pre><h2 id=\"basic-usage\">Basic usage</h2>\n<pre><span class=\"hljs-keyword\">import</span> h <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">&apos;h0&apos;</span>\n\n<span class=\"hljs-keyword\">const</span> tree = h(<span class=\"hljs-string\">&apos;div&apos;</span>)({\n style: {\n padding: <span class=\"hljs-number\">32</span>\n }\n})(\n h(<span class=\"hljs-string\">&apos;h1&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n)</pre><h2 id=\"creating-element-functions\">Creating element functions</h2>\n<pre><span class=\"hljs-keyword\">const</span> div = h(<span class=\"hljs-string\">&apos;div&apos;</span>)\n<span class=\"hljs-keyword\">const</span> h1 = h(<span class=\"hljs-string\">&apos;h1&apos;</span>)\n<span class=\"hljs-keyword\">const</span> a = h(<span class=\"hljs-string\">&apos;a&apos;</span>)\n\n<span class=\"hljs-keyword\">const</span> tree = div(\n h1(<span class=\"hljs-string\">&apos;hello&apos;</span>),\n a({ href: <span class=\"hljs-string\">&apos;/hello&apos;</span> })(<span class=\"hljs-string\">&apos;hi&apos;</span>)\n)</pre><h2 id=\"creating-styled-element-functions\">Creating styled element functions</h2>\n<pre><span class=\"hljs-keyword\">const</span> h1 = h(<span class=\"hljs-string\">&apos;h1&apos;</span>)({\n style: {\n fontSize: <span class=\"hljs-number\">48</span>,\n fontWeight: <span class=\"hljs-number\">500</span>\n }\n})\n\n<span class=\"hljs-keyword\">const</span> tree = h1(<span class=\"hljs-string\">&apos;hello&apos;</span>)</pre><h2 id=\"api\">API</h2>\n<h3 id=\"-h-\"><code>h()</code></h3>\n<p>Function that returns an element creation function with the given tagname.\nThe returned function accepts either a plain object to set attributes, or a string or child elements to return an element.</p>\n<pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)\n<span class=\"hljs-comment\">// returns an element creation function</span></pre><pre>h(&apos;div&apos;)({ class: &apos;hi&apos; })\n// returns an element creation function with attributes</pre><pre>h(&apos;div&apos;)({ class: &apos;hi&apos; })(&apos;hello&apos;)\n// returns a DOM element with an id and text content\n// &lt;div class=&apos;hi&apos;&gt;hello&lt;/div&gt;</pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)({\n style: {\n color: <span class=\"hljs-string\">&apos;blue&apos;</span>\n }\n})(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n<span class=\"hljs-comment\">// Style objects are converted to strings</span>\n<span class=\"hljs-comment\">// &lt;div style=&apos;color:blue&apos;&gt;hello&lt;/div&gt;</span></pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n<span class=\"hljs-comment\">// returns a DOM element with text content</span>\n<span class=\"hljs-comment\">// &lt;div&gt;hello&lt;/div&gt;</span></pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)(\n h(<span class=\"hljs-string\">&apos;h1&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n)\n<span class=\"hljs-comment\">// returns a DOM element with child element</span>\n<span class=\"hljs-comment\">// &lt;div&gt;</span>\n<span class=\"hljs-comment\">// &lt;h1&gt;hello&lt;/h1&gt;</span>\n<span class=\"hljs-comment\">// &lt;/div&gt;</span></pre><p>MIT License</p>\n"
"html": "\n<p></p>\n<p>Hyperminimal functional DOM element microlibrary</p>\n<p><a href=\"https://travis-ci.org/jxnblk/h0\"></a></p>\n<p><strong>Experimental</strong></p>\n<pre>npm i h0</pre><h2>Basic usage</h2>\n<pre><span class=\"hljs-keyword\">import</span> h <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">&apos;h0&apos;</span>\n\n<span class=\"hljs-keyword\">const</span> tree = h(<span class=\"hljs-string\">&apos;div&apos;</span>)({\n style: {\n padding: <span class=\"hljs-number\">32</span>\n }\n})(\n h(<span class=\"hljs-string\">&apos;h1&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n)</pre><h2>Creating element functions</h2>\n<pre><span class=\"hljs-keyword\">const</span> div = h(<span class=\"hljs-string\">&apos;div&apos;</span>)\n<span class=\"hljs-keyword\">const</span> h1 = h(<span class=\"hljs-string\">&apos;h1&apos;</span>)\n<span class=\"hljs-keyword\">const</span> a = h(<span class=\"hljs-string\">&apos;a&apos;</span>)\n\n<span class=\"hljs-keyword\">const</span> tree = div(\n h1(<span class=\"hljs-string\">&apos;hello&apos;</span>),\n a({ href: <span class=\"hljs-string\">&apos;/hello&apos;</span> })(<span class=\"hljs-string\">&apos;hi&apos;</span>)\n)</pre><h2>Creating styled element functions</h2>\n<pre><span class=\"hljs-keyword\">const</span> h1 = h(<span class=\"hljs-string\">&apos;h1&apos;</span>)({\n style: {\n fontSize: <span class=\"hljs-number\">48</span>,\n fontWeight: <span class=\"hljs-number\">500</span>\n }\n})\n\n<span class=\"hljs-keyword\">const</span> tree = h1(<span class=\"hljs-string\">&apos;hello&apos;</span>)</pre><h2>API</h2>\n<h3><code>h()</code></h3>\n<p>Function that returns an element creation function with the given tagname.\nThe returned function accepts either a plain object to set attributes, or a string or child elements to return an element.</p>\n<pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)\n<span class=\"hljs-comment\">// returns an element creation function</span></pre><pre>h(&apos;div&apos;)({ class: &apos;hi&apos; })\n// returns an element creation function with attributes</pre><pre>h(&apos;div&apos;)({ class: &apos;hi&apos; })(&apos;hello&apos;)\n// returns a DOM element with an id and text content\n// &lt;div class=&apos;hi&apos;&gt;hello&lt;/div&gt;</pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)({\n style: {\n color: <span class=\"hljs-string\">&apos;blue&apos;</span>\n }\n})(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n<span class=\"hljs-comment\">// Style objects are converted to strings</span>\n<span class=\"hljs-comment\">// &lt;div style=&apos;color:blue&apos;&gt;hello&lt;/div&gt;</span></pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n<span class=\"hljs-comment\">// returns a DOM element with text content</span>\n<span class=\"hljs-comment\">// &lt;div&gt;hello&lt;/div&gt;</span></pre><pre>h(<span class=\"hljs-string\">&apos;div&apos;</span>)(\n h(<span class=\"hljs-string\">&apos;h1&apos;</span>)(<span class=\"hljs-string\">&apos;hello&apos;</span>)\n)\n<span class=\"hljs-comment\">// returns a DOM element with child element</span>\n<span class=\"hljs-comment\">// &lt;div&gt;</span>\n<span class=\"hljs-comment\">// &lt;h1&gt;hello&lt;/h1&gt;</span>\n<span class=\"hljs-comment\">// &lt;/div&gt;</span></pre><p>MIT License</p>\n"
},
{
"component": "footer",
Expand Down

0 comments on commit d343d38

Please sign in to comment.