Skip to content

Commit

Permalink
Merge pull request #153 from nyan-left/patch-1
Browse files Browse the repository at this point in the history
docs: (vanilla) add disposal section and fix example image
  • Loading branch information
bbohlender authored Dec 4, 2024
2 parents 7505a6f + 38b2264 commit 2d51c26
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 2d51c26

Please sign in to comment.