aura-toast 1.7.0 → 1.8.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 +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,9 +50,10 @@ import { AuraProvider } from 'aura-toast';
|
|
|
50
50
|
import 'aura-toast/dist/style.css';
|
|
51
51
|
|
|
52
52
|
// Wrap your app. Optionally pass stack={true} to allow multiple layered toasts.
|
|
53
|
+
// You can also set a default built-in theme for all toasts.
|
|
53
54
|
function App() {
|
|
54
55
|
return (
|
|
55
|
-
<AuraProvider stack={true}>
|
|
56
|
+
<AuraProvider stack={true} theme="light">
|
|
56
57
|
<YourApp />
|
|
57
58
|
</AuraProvider>
|
|
58
59
|
);
|
|
@@ -76,6 +77,7 @@ function MyComponent() {
|
|
|
76
77
|
// You can pass a string title and a config object:
|
|
77
78
|
auraToast.success('Changes saved successfully!', {
|
|
78
79
|
description: 'Your database has been updated.',
|
|
80
|
+
theme: 'light',
|
|
79
81
|
action: {
|
|
80
82
|
label: 'Undo',
|
|
81
83
|
onClick: () => console.log('Undo clicked'),
|
|
@@ -134,10 +136,11 @@ auraToast.success({ title: 'Works in Vanilla JS too!' });
|
|
|
134
136
|
| `position` | `ToastPosition` | E.g. `'top-right'`, `'bottom-center'`. |
|
|
135
137
|
| `action` | `{ label: string, onClick: () => void }` | Optional action button. |
|
|
136
138
|
| `glassy` | `boolean` | Enable or disable premium backdrop-blur effects. |
|
|
139
|
+
| `theme` | `'dark' \| 'light'` | Use AuraToast's built-in dark or light appearance. |
|
|
137
140
|
|
|
138
141
|
## Customization
|
|
139
142
|
|
|
140
|
-
|
|
143
|
+
AuraToast ships with built-in `dark` and `light` themes, and you can still override the default styles and typography by providing values for these CSS variables natively in your app or within the `style` prop of a specific toast:
|
|
141
144
|
|
|
142
145
|
```css
|
|
143
146
|
:root {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aura-toast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"homepage": "https://damicode18.github.io/aura-toast/",
|
|
5
5
|
"description": "Premium React toast notifications with glassmorphism design. Lightweight, customizable, and enforces a single-toast constraint for clean UI.",
|
|
6
6
|
"main": "dist/aura-toast.cjs.js",
|