From 38b2264885668cc7072da25624f3bee3d185e94e Mon Sep 17 00:00:00 2001 From: Deimantas Jakovlevas <5834889+nyan-left@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:48:59 +0700 Subject: [PATCH] docs: add disposal section and fix example image --- docs/getting-started/vanilla.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/vanilla.md b/docs/getting-started/vanilla.md index dff96170..a7db49f4 100644 --- a/docs/getting-started/vanilla.md +++ b/docs/getting-started/vanilla.md @@ -59,7 +59,6 @@ const defaultProperties = { } const container1 = new Container( - root, { flexGrow: 1, hover: { backgroundOpacity: 1 } @@ -70,7 +69,6 @@ const container1 = new Container( root.add(container1) const container2 = new Container( - root, { flexGrow: 1, backgroundOpacity: 0.5, @@ -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() +``` +