-
Notifications
You must be signed in to change notification settings - Fork 25
/
table-controls.js
41 lines (36 loc) · 1.01 KB
/
table-controls.js
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
import { css } from 'lit';
import { SelectionControls } from '../selection/selection-controls.js';
/**
* Controls for table components containing a selection summary and selection actions.
*/
class TableControls extends SelectionControls {
static get properties() {
return {
/**
* Whether to render the selection summary
* @type {boolean}
*/
noSelection: { type: Boolean, attribute: 'no-selection' }
};
}
static get styles() {
return [super.styles, css`
:host {
--d2l-selection-controls-background-color: var(--d2l-table-controls-background-color);
--d2l-selection-controls-shadow-display: var(--d2l-table-controls-shadow-display);
z-index: 6; /* Must be greater than d2l-table-wrapper and d2l-scroll-wrapper */
}
:host([no-sticky]) {
z-index: auto;
}
`];
}
constructor() {
super();
this._noSelectAll = true;
}
_getSelectionControlsLabel() {
return this.localize('components.table-controls.label');
}
}
customElements.define('d2l-table-controls', TableControls);