Skip to content

Commit 4ecf297

Browse files
committed
Update documentation
1 parent 7d8fd9a commit 4ecf297

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,14 @@ ToastContainer {
109109
ToastItem {
110110
width: var(--toastWidth, 16rem);
111111
height: var(--toastHeight, 3.5rem);
112-
margin-bottom: var(--toastMarginBottom, 0.5rem);
113-
background: var(--toastBackground, rgba(74,85,104,0.98));
112+
margin: var(--toastMargin, 0 0 0.5rem 0);
113+
background: var(--toastBackground, rgba(66,66,66,0.9));
114114
color: var(--toastColor, #FFF);
115-
}
116-
117-
ToastItemMessage {
118-
font-size: var(--toastFontSize, 1rem);
115+
font: var(--toastFont);
119116
}
120117
121118
ToastProgressBar {
122-
background: var(--toastProgressBackground, rgba(66,153,225,0.98));
119+
background: var(--toastProgressBackground, rgba(33,150,243,0.75));
123120
}
124121
```
125122

@@ -136,17 +133,20 @@ So to apply your custom theme globally, do something like:
136133
</style>
137134
```
138135

139-
To apply overrides to a particular Toast Item, emit the toast with options:
136+
To apply CSS overrides to a particular Toast Item, emit the toast with options:
140137

141138
```js
142139
toast.push('Yo!', {
143140
theme: {
144141
'--toastBackground': 'cyan',
145-
'--toastColor': 'black'
142+
'--toastColor': 'black',
143+
...
146144
}
147145
})
148146
```
149147

148+
where `theme` is an object containing one or more CSS var key/value pairs.
149+
150150
## Options
151151

152152
```js
@@ -170,8 +170,11 @@ toast.pop(id)
170170
toast.set(id, { object })
171171
```
172172

173+
## License
174+
175+
ISC
176+
173177
## To-do
174178

175179
- [ ] Definitely improve the docs
176180
- [ ] Create some option presets
177-

0 commit comments

Comments
 (0)