Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
aria-label="Select text alignment"
>
@for (alignment of alignments; track alignment) {
<li ngRadioButton [value]="alignment.value" class="example-radio-button">
<li
ngRadioButton
[value]="alignment.value"
[disabled]="disabledOptions.includes(alignment.value)"
class="example-radio-button">
<span class="example-radio-indicator"></span>
<span>{{ alignment.label }}</span>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ export class ToolbarBasicHorizontalExample {
{value: 'center', label: 'Center'},
{value: 'right', label: 'Right'},
];

// Control for which radio options are individually disabled
disabledOptions: string[] = ['center'];

format(tool: string) {
console.log(`Tool activated: ${tool}`);
this._liveAnnouncer.announce(`${tool} applied`, 'polite');
}

test(action: string) {
console.log(`Action triggered: ${action}`);
this._liveAnnouncer.announce(`${action} button activated`, 'polite');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
aria-label="Select text alignment"
>
@for (alignment of alignments; track alignment) {
<li ngRadioButton [value]="alignment.value" class="example-radio-button">
<li
ngRadioButton
[value]="alignment.value"
[disabled]="disabledOptions.includes(alignment.value)"
class="example-radio-button">
<span class="example-radio-indicator"></span>
<span>{{ alignment.label }}</span>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ export class ToolbarBasicVerticalExample {
{value: 'center', label: 'Center'},
{value: 'right', label: 'Right'},
];

// Control for which radio options are individually disabled
disabledOptions: string[] = ['center'];

format(tool: string) {
console.log(`Tool activated: ${tool}`);
this._liveAnnouncer.announce(`${tool} applied`, 'polite');
}

test(action: string) {
console.log(`Action triggered: ${action}`);
this._liveAnnouncer.announce(`${action} button activated`, 'polite');
Expand Down
Loading