varsel 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,19 +21,23 @@ Varsel ships only ESM and expects Svelte 5+.
|
|
|
21
21
|
}
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
|
-
<button
|
|
24
|
+
<button onclick={notify}>Save</button>
|
|
25
25
|
<VarselToaster />
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### Styles
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Varsel ships with a **prebuilt CSS file**, meaning it works out of the box without requiring you to configure Tailwind CSS or PostCSS in your application.
|
|
31
|
+
|
|
32
|
+
Simply import the styles once in your root layout or entry file:
|
|
31
33
|
|
|
32
34
|
```ts
|
|
33
|
-
// main.ts
|
|
35
|
+
// src/routes/+layout.svelte (or main.ts)
|
|
34
36
|
import "varsel/styles.css";
|
|
35
37
|
```
|
|
36
38
|
|
|
39
|
+
The styles are fully self-contained and scoped, using CSS variables for easy theming.
|
|
40
|
+
|
|
37
41
|
### API
|
|
38
42
|
|
|
39
43
|
- `toast(description | ToastData)` – add a toast.
|