@bbki.ng/bb-msg-history 0.7.3 → 0.9.0
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/dist/component.js +2 -2
- package/dist/const/styles.js +10 -0
- package/package.json +1 -1
- package/src/component.ts +2 -2
- package/src/const/styles.ts +10 -0
package/dist/component.js
CHANGED
|
@@ -6,7 +6,7 @@ import { buildMessageRowHtml, setupTooltipForElement } from './utils/message-bui
|
|
|
6
6
|
import { buildScrollButtonHtml } from './utils/scroll-button.js';
|
|
7
7
|
export class BBMsgHistory extends HTMLElement {
|
|
8
8
|
static get observedAttributes() {
|
|
9
|
-
return ['theme', 'loading'];
|
|
9
|
+
return ['theme', 'loading', 'hide-scroll-bar'];
|
|
10
10
|
}
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
@@ -16,7 +16,7 @@ export class BBMsgHistory extends HTMLElement {
|
|
|
16
16
|
this.attachShadow({ mode: 'open' });
|
|
17
17
|
}
|
|
18
18
|
attributeChangedCallback(name) {
|
|
19
|
-
if (name === 'theme' || name === 'loading') {
|
|
19
|
+
if (name === 'theme' || name === 'loading' || name === 'hide-scroll-bar') {
|
|
20
20
|
this.render();
|
|
21
21
|
}
|
|
22
22
|
}
|
package/dist/const/styles.js
CHANGED
|
@@ -50,6 +50,16 @@ export const MAIN_STYLES = `
|
|
|
50
50
|
background: ${THEME.gray[500]};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/* Hide scrollbar styles */
|
|
54
|
+
:host([hide-scroll-bar]) .history {
|
|
55
|
+
scrollbar-width: none; /* Firefox */
|
|
56
|
+
-ms-overflow-style: none; /* IE/Edge */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([hide-scroll-bar]) .history::-webkit-scrollbar {
|
|
60
|
+
display: none; /* Chrome, Safari, Opera */
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
/* Scroll to bottom button */
|
|
54
64
|
.scroll-to-bottom {
|
|
55
65
|
position: absolute;
|
package/package.json
CHANGED
package/src/component.ts
CHANGED
|
@@ -14,7 +14,7 @@ export class BBMsgHistory extends HTMLElement {
|
|
|
14
14
|
private _scrollButtonVisible = false;
|
|
15
15
|
|
|
16
16
|
static get observedAttributes() {
|
|
17
|
-
return ['theme', 'loading'];
|
|
17
|
+
return ['theme', 'loading', 'hide-scroll-bar'];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
constructor() {
|
|
@@ -23,7 +23,7 @@ export class BBMsgHistory extends HTMLElement {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
attributeChangedCallback(name: string) {
|
|
26
|
-
if (name === 'theme' || name === 'loading') {
|
|
26
|
+
if (name === 'theme' || name === 'loading' || name === 'hide-scroll-bar') {
|
|
27
27
|
this.render();
|
|
28
28
|
}
|
|
29
29
|
}
|
package/src/const/styles.ts
CHANGED
|
@@ -51,6 +51,16 @@ export const MAIN_STYLES = `
|
|
|
51
51
|
background: ${THEME.gray[500]};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/* Hide scrollbar styles */
|
|
55
|
+
:host([hide-scroll-bar]) .history {
|
|
56
|
+
scrollbar-width: none; /* Firefox */
|
|
57
|
+
-ms-overflow-style: none; /* IE/Edge */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([hide-scroll-bar]) .history::-webkit-scrollbar {
|
|
61
|
+
display: none; /* Chrome, Safari, Opera */
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
/* Scroll to bottom button */
|
|
55
65
|
.scroll-to-bottom {
|
|
56
66
|
position: absolute;
|