Skip to content

Commit

Permalink
fixes conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Mar 5, 2019
2 parents aea911e + 6fa6d02 commit 150e346
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 201 deletions.
11 changes: 7 additions & 4 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@
| <code>reRender(Object &#124; Function)</code> | Set the properties of a component instance. Can also take a function which will receive the current props as an argument. |
| `getProps()` | Get the properties of a component instance. |
| <code>setState(Object &#124; Function)</code> | Set the state of a component instance. Can also take a function which will receive the current props as an argument. |
| `stylesheet()` | Returns a string of css to be lazily added to a `style` tag in the head. |
| `styles()` | Returns an object that represents inline-styles to be applied to the component. Styles are applied by adding a keys from the object to the `styles` attribute of an html tag in the render function, for example `styles="key1 key2"`. Each object's key-value pair are added to the element's style object. |
| `render()` | Returns HTML to be parsed or a dom node that will overwrite. There is usually no need to call this directly, prefer `componentInstance.reRender({ ... })`. |
| `stylesheet()` | Should return a string of css to be lazily added to a `style` tag in the head. |
| `styles()` | Should return an object that represents inline-styles to be applied to the component. Styles are applied by adding a keys from the object to the `styles` attribute of an html tag in the render function, for example `styles="key1 key2"`. Each object's key-value pair are added to the element's style object. |
| `render()` | Should return HTML or nodes to be parsed or a dom node that will overwrite. There is usually no need to call this directly, prefer `componentInstance.reRender({ ... })`. |
| html\`...\` | Tidy up an HTML string (use as a [tagged template][2]). |

## INSTANCE PROPERTIES

| Name | Description |
| :--- | :--- |
| <code>children</code> | An array of nodes, the original child nodes of the component. |
| <code>childElements</code> | An array of nodes, the original child *elements* of the component. |
| <code>childNodes</code> | An array of nodes, the original child *nodes* of the component. |
| <code>props</code> | An object that contains the properties that were passed to the component. |
| <code>state</code> | A plain-old JSON object that contains the state of the component. |

## "LIFECYCLE" INSTANCE METHODS

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![tonic](https://github.com/hxoht/tonic/raw/addimage/readme-tonic.png)
![tonic](https://raw.githubusercontent.com/heapwolf/tonic/master/readme-tonic.png)

<p align="center">
https://tonic.technology
Expand Down
2 changes: 1 addition & 1 deletion dist/tonic.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 150e346

Please sign in to comment.