Skip to content

Commit c535347

Browse files
committed
refactor(carousel-item): add attribute role = "group"
1 parent 42200f6 commit c535347

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

projects/coreui-angular/src/lib/carousel/carousel-item/carousel-item.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
1010
exportAs: 'cCarouselItem',
1111
host: {
1212
class: 'carousel-item',
13-
'[class.active]': 'active()'
13+
'[class.active]': 'active()',
14+
'[attr.role]': 'role()'
1415
}
1516
})
1617
export class CarouselItemComponent {
@@ -38,6 +39,13 @@ export class CarouselItemComponent {
3839
*/
3940
readonly interval = input<number>(-1);
4041

42+
/**
43+
* Carousel item role.
44+
* @return string
45+
* @default 'group'
46+
*/
47+
readonly role = input('group');
48+
4149
constructor() {
4250
this.#carouselService.carouselIndex$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((nextIndex) => {
4351
if ('active' in nextIndex) {

0 commit comments

Comments
 (0)