Skip to content

Commit

Permalink
docs: add disposal section and fix example image
Browse files Browse the repository at this point in the history
  • Loading branch information
nyan-left authored Dec 4, 2024
1 parent 7505a6f commit 38b2264
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/getting-started/vanilla.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const defaultProperties = {
}

const container1 = new Container(
root,
{
flexGrow: 1,
hover: { backgroundOpacity: 1 }
Expand All @@ -70,7 +69,6 @@ const container1 = new Container(
root.add(container1)

const container2 = new Container(
root,
{
flexGrow: 1,
backgroundOpacity: 0.5,
Expand Down Expand Up @@ -126,3 +124,14 @@ If you use vite (`npm i vite`), you can create a `index.html` file, add the foll
```

The result should look like this

![Two containers in a row layout - one red and one blue with hover effects](./basic-example.gif)

### Disposing

Call `destroy()` on elements to free resources:

```js
root.destroy()
```

0 comments on commit 38b2264

Please sign in to comment.