-
Notifications
You must be signed in to change notification settings - Fork 2
/
card.actions.ts
46 lines (40 loc) · 1.23 KB
/
card.actions.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
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { all } from './themes/actions.js';
import { styles } from './themes/card.actions.base.css.js';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';
/** A container for card action items like buttons
* @element igc-card-actions
*
* @slot start - Renders items at the beginning of actions area
* @slot - Renders items at the middle of actions area
* @slot end - Renders items at the end of actions area
*/
@themes(all)
export default class IgcCardActionsComponent extends LitElement {
public static readonly tagName = 'igc-card-actions';
public static override styles = styles;
/* blazorSuppress */
public static register() {
registerComponent(this);
}
/**
* The orientation of the actions.
* @attr
*/
@property({ reflect: true })
public orientation: 'vertical' | 'horizontal' = 'horizontal';
protected override render() {
return html`
<slot name="start"></slot>
<slot></slot>
<slot name="end"></slot>
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-card-actions': IgcCardActionsComponent;
}
}