update readme
This commit is contained in:
35
README.md
35
README.md
@@ -5,20 +5,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
Usage: Install the VSCode extension "Quill".
|
Quill is a SwiftUI-style JavaScript framework. It makes use of components called Shadows, which are HTML Custom Elements.
|
||||||
|
|
||||||
## Rendering Elements:
|
### Getting Started:
|
||||||
|
Go to https://github.com/capturedsun/template-quill and clone this repo.
|
||||||
|
|
||||||
|
### App:
|
||||||
|
src/app.js is the application entry point. Any Shadows rendered inside will be rendered in the body.
|
||||||
|
|
||||||
|
### Rendering Elements:
|
||||||
|
|
||||||
|
The basis of rendering is the Shadow, which extends HTMLElement. The Shadow is the equivalent of a React Component.
|
||||||
|
|
||||||
|
To create a Shadow, simply:
|
||||||
|
- Create a class which extends Shadow
|
||||||
|
- Include a render() function
|
||||||
|
- Register the shadow as an element
|
||||||
|
|
||||||
|
...
|
||||||
```
|
```
|
||||||
document.body.append(
|
class File extends Shadow {
|
||||||
p("Hi")
|
render = () => {
|
||||||
.padding("top", 12),
|
p(this.name)
|
||||||
|
p("asd")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Link({href: "google.com", name: "hey"})
|
register(File, "file-el")
|
||||||
.background("green")
|
|
||||||
|
|
||||||
// NavigationBar()
|
|
||||||
// .onClick()
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Needs Support:
|
## Needs Support:
|
||||||
|
|||||||
Reference in New Issue
Block a user