\`,
})
export class ButtonLinksComponent {}`;
export /**
*
*/
const BUTTON_DISABLED = `// [disabled] works on buttons and anchors (anchors get aria-disabled + tabindex=-1).
// Use this for unavailable actions — in-flight work belongs on [loading].
import { Component, signal } from '@angular/core';
import { ButtonComponent } from '@africanies/africanies-ui';
@Component({
selector: 'app-button-disabled',
standalone: true,
imports: [ButtonComponent],
template: \`
\`,
})
export class ButtonDisabledComponent {
protected readonly saving = signal(false);
}`;
export /**
*
*/
const BUTTON_LOADING = `// Default loading state is the circular spinner. Label stays in the layout
// (invisible) so the button does not shrink while the request is in flight.
import { Component, signal } from '@angular/core';
import { ButtonComponent } from '@africanies/africanies-ui';
@Component({
selector: 'app-button-loading',
standalone: true,
imports: [ButtonComponent],
template: \`
\`,
})
export class ButtonLoadingComponent {
protected readonly saving = signal(false);
protected save(): void {
this.saving.set(true);
// POST → finalize in subscribe/finalize and set saving false.
}
}`;
export /**
*
*/
const BUTTON_CONTEXT = `// Typical toolbar: ghost cancel → secondary draft → primary submit.
// Toggle SFN/STN in the sidebar to see primary shift color.
import { Component, inject, signal } from '@angular/core';
import { ModeColorService } from '@africanies/africanies-theme';
import { ButtonComponent } from '@africanies/africanies-ui';
@Component({
selector: 'app-shipment-toolbar',
standalone: true,
imports: [ButtonComponent],
template: \`
Shipment {{ ref() }}
Draft · {{ route() }}
\`,
})
export class ShipmentToolbarComponent {
protected readonly modeColor = inject(ModeColorService);
protected readonly ref = signal('SFN-1042');
protected readonly route = signal('Lagos → London');
protected readonly saving = signal(false);
protected cancel(): void {
// Navigate away or close parent overlay ref.
}
protected saveDraft(): void {
this.saving.set(true);
// POST draft → finalize in subscribe/finalize and set saving false.
}
protected submit(): void {
this.saving.set(true);
// POST submit → on success close overlay or navigate to detail.
}
}`;
export /**
*
*/
const BUTTON_COPY = `// Clipboard control — icon flips to check on success.
// Optional [announce]="true" also fires a toast when ToastService is provided.
import { Component, signal } from '@angular/core';
import { CopyButtonComponent } from '@africanies/africanies-ui';
@Component({
selector: 'app-copy-demo',
standalone: true,
imports: [CopyButtonComponent],
template: \`