-
Notifications
You must be signed in to change notification settings - Fork 2
/
card.header.ts
49 lines (44 loc) · 1.36 KB
/
card.header.ts
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
import { LitElement, html } from 'lit';
import { styles } from './themes/card.header.base.css.js';
import { all } from './themes/header.js';
import { styles as shared } from './themes/shared/header/card.header.common.css.js';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';
/** A container for card's header
* @element igc-card-header
*
* @slot thumbnail - Renders header media like icon
* @slot title - Renders the card title
* @slot subtitle - Renders the card subtitle
* @slot - Renders content next to the card title
*
* @csspart header - The card header container
*/
@themes(all)
export default class IgcCardHeaderComponent extends LitElement {
public static readonly tagName = 'igc-card-header';
public static override styles = [styles, shared];
/* blazorSuppress */
public static register() {
registerComponent(this);
}
protected override render() {
return html`
<section>
<slot name="thumbnail"></slot>
</section>
<section>
<header part="header">
<slot part="title" name="title"></slot>
<slot part="subtitle" name="subtitle"></slot>
</header>
<slot></slot>
</section>
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-card-header': IgcCardHeaderComponent;
}
}