-
Notifications
You must be signed in to change notification settings - Fork 2
/
radio-group.ts
48 lines (42 loc) · 1.33 KB
/
radio-group.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
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { styles } from './radio-group.base.css.js';
import { styles as fluent } from './radio-group.fluent.css.js';
import { styles as indigo } from './radio-group.indigo.css.js';
import { styles as material } from './radio-group.material.css.js';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';
import IgcRadioComponent from '../radio/radio.js';
/**
* The igc-radio-group component unifies one or more igc-radio buttons.
*
* @element igc-radio-group
*
* @slot - Default slot
*/
@themes({
light: { material, fluent, indigo },
dark: { material, fluent, indigo },
})
export default class IgcRadioGroupComponent extends LitElement {
public static readonly tagName = 'igc-radio-group';
public static override styles = styles;
/* blazorSuppress */
public static register() {
registerComponent(this, IgcRadioComponent);
}
/**
* Alignment of the radio controls inside this group.
* @attr
*/
@property({ reflect: true })
public alignment: 'vertical' | 'horizontal' = 'vertical';
protected override render() {
return html`<slot></slot>`;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-radio-group': IgcRadioGroupComponent;
}
}