update readme
This commit is contained in:
35
README.md
35
README.md
@@ -5,20 +5,33 @@
|
||||
</p>
|
||||
<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(
|
||||
p("Hi")
|
||||
.padding("top", 12),
|
||||
class File extends Shadow {
|
||||
render = () => {
|
||||
p(this.name)
|
||||
p("asd")
|
||||
}
|
||||
}
|
||||
|
||||
Link({href: "google.com", name: "hey"})
|
||||
.background("green")
|
||||
|
||||
// NavigationBar()
|
||||
// .onClick()
|
||||
)
|
||||
register(File, "file-el")
|
||||
```
|
||||
|
||||
## Needs Support:
|
||||
|
||||
Reference in New Issue
Block a user