forked from SciSharp/BotSharp-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationDropdown.svelte
More file actions
65 lines (61 loc) · 2.08 KB
/
Copy pathNotificationDropdown.svelte
File metadata and controls
65 lines (61 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<script lang="ts">
import Link from 'svelte-link/src/Link.svelte';
import { Dropdown, DropdownToggle, DropdownMenu } from '@sveltestrap/sveltestrap';
import "overlayscrollbars/overlayscrollbars.css";
import { OverlayScrollbars } from "overlayscrollbars";
import { _ } from 'svelte-i18n'
import { onMount } from 'svelte';
const options = {
scrollbars: {
visibility: "auto", // You can adjust the visibility ('auto', 'hidden', 'visible')
autoHide: "move", // You can adjust the auto-hide behavior ('move', 'scroll', false)
autoHideDelay: 100,
dragScroll: true,
clickScroll: false,
theme: "os-theme-light",
pointers: ["mouse", "touch", "pen"],
},
};
onMount(() => {
const menuElement = document.querySelector("#notification");
OverlayScrollbars(menuElement, options);
})
</script>
<Dropdown class="d-none d-lg-inline-block">
<DropdownToggle type="button" color="" tag="a" class="btn header-item noti-icon waves-effect">
<i class="bx bx-bell bx-tada" />
<span class="badge bg-danger rounded-pill">1</span>
</DropdownToggle>
<DropdownMenu class="dropdown-menu-lg" end>
<div class="p-3">
<div class="row align-items-center">
<div class="col">
<h6 class="m-0">{$_('Notifications')}</h6>
</div>
<div class="col-auto">
<Link class="small" disabled>{$_('View All')}</Link>
</div>
</div>
</div>
<div style="max-height: 230px;" id="notification">
<Link href="javascript: void(0);" class="text-reset notification-item" disabled>
<div class="d-flex">
<div class="avatar-xs me-3">
<span class="avatar-title bg-primary rounded-circle font-size-16">
<i class="bx bx-cart" />
</span>
</div>
<div class="flex-grow-1">
<h6 class="mb-1" >{$_('Your order is placed')}</h6>
<div class="font-size-12 text-muted">
<p class="mb-1" >{$_('If several languages coalesce the grammar')}</p>
<p class="mb-0">
<i class="mdi mdi-clock-outline" /> <span >3 {$_('min ago')}</span>
</p>
</div>
</div>
</div>
</Link>
</div>
</DropdownMenu>
</Dropdown>