-
-
Notifications
You must be signed in to change notification settings - Fork 126
window
Marc Espín Sanz edited this page Jun 23, 2020
·
5 revisions
The Window constructor allows you to open windows inside Graviton itself, Graviton internally uses this for the Settings and Welcome windows.
A simple example:
function entry(API){
const myComponent = () => API.puffin.element`<p>Hello World</p>`
const myWindow = new API.Window({
component: myComponent
})
myWindow.launch()
}
The Window constructors takes only one object as argument; you must pass the component via the component property.
Properties:
- component: refers to the puffin component you want to display
- title (optional): for debuging purposes
- height (optional): custom window's height
- width (optional): custom window's width
Your window's instance has a launch method used to open the window.
Documentation
Tutorials
Contributing
About