Skip to content

Commit 8b8b973

Browse files
committed
Add Rich HTML example
1 parent 4df1f5d commit 8b8b973

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

docs/App.svelte

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,23 @@ const buttons = [
3939
}
4040
},
4141
{
42-
name: 'YELLOW',
43-
code: `toast.push('Warning!', {
42+
name: 'RED',
43+
code: `toast.push('Danger!', {
4444
theme: {
45-
'--toastBackground': '#ECC94B',
46-
'--toastProgressBackground': '#B7791F'
45+
'--toastBackground': '#F56565',
46+
'--toastProgressBackground': '#C53030'
4747
}
4848
})`,
4949
run: () => {
50-
toast.push('Warning!', { theme: { '--toastBackground': '#ECC94B', '--toastProgressBackground': '#B7791F' } })
50+
toast.push('Danger!', { theme: { '--toastBackground': '#F56565', '--toastProgressBackground': '#C53030' } })
5151
}
5252
},
5353
{
54-
name: 'RED',
55-
code: `toast.push('Error!', {
56-
theme: {
57-
'--toastBackground': '#F56565',
58-
'--toastProgressBackground': '#C53030'
59-
}
60-
})`,
54+
name: 'RICH HTML',
55+
code: `toast.push(\`<strong>You won the jackpot!</strong><br>
56+
Click <a href="#" target="_blank">here</a> for details! 😛\`)`,
6157
run: () => {
62-
toast.push('Error!', { theme: { '--toastBackground': '#F56565', '--toastProgressBackground': '#C53030' } })
58+
toast.push('<strong>You won the jackpot!</strong><br>Click <a href="#" target="_blank">here</a> for details! 😛')
6359
}
6460
},
6561
{

0 commit comments

Comments
 (0)