Skip to content

Commit

Permalink
Fixed #10207 - IndicatorStyle and IndicatorStyleClass support for Car…
Browse files Browse the repository at this point in the history
…ousel
  • Loading branch information
yigitfindikli committed May 6, 2021
1 parent c2d51e9 commit 4d54b74
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/app/components/carousel/carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ import { UniqueComponentId } from 'primeng/utils';
<span [ngClass]="{'p-carousel-prev-icon pi': true, 'pi-chevron-right': !isVertical(), 'pi-chevron-down': isVertical()}"></span>
</button>
</div>
<ul [ngClass]="'p-carousel-indicators p-reset'" [class]="indicatorsContentClass">
<ul [ngClass]="'p-carousel-indicators p-reset'" [class]="indicatorsContentClass" [ngStyle]="indicatorsContentStyle">
<li *ngFor="let totalDot of totalDotsArray(); let i = index" [ngClass]="{'p-carousel-indicator':true,'p-highlight': _page === i}">
<button type="button" class="p-link" (click)="onDotClick($event, i)"></button>
<button type="button" class="p-link" (click)="onDotClick($event, i)" [class]="indicatorStyleClass" [ngStyle]="indicatorStyle"></button>
</li>
</ul>
</div>
Expand Down Expand Up @@ -102,9 +102,15 @@ export class Carousel implements AfterContentInit {

@Input() verticalViewPortHeight = "300px";

@Input() contentClass: String = "";
@Input() contentClass: string = "";

@Input() indicatorsContentClass: String = "";
@Input() indicatorsContentClass: string = "";

@Input() indicatorsContentStyle: any;

@Input() indicatorStyleClass: string = "";

@Input() indicatorStyle: any;

@Input() get value() :any[] {
return this._value;
Expand Down
20 changes: 19 additions & 1 deletion src/app/showcase/components/carousel/carouseldemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h5>Properties</h5>
</tr>
<tr>
<td>style</td>
<td>string</td>
<td>object</td>
<td>null</td>
<td>Inline style of the component.</td>
</tr>
Expand Down Expand Up @@ -279,6 +279,24 @@ <h5>Properties</h5>
<td>null</td>
<td>Style class of the paginator items.</td>
</tr>
<tr>
<td>indicatorsContentStyle</td>
<td>object</td>
<td>null</td>
<td>Style of the paginator items.</td>
</tr>
<tr>
<td>indicatorStyleClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the indicators.</td>
</tr>
<tr>
<td>indicatorStyle</td>
<td>string</td>
<td>null</td>
<td>Style of the indicators.</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 4d54b74

Please sign in to comment.