+ @if (labelPosition === 'left') {
+
+ }
+
+
+ @if (caption) {
+ {{ caption }}
+ }
+
+ @if (labelPosition === 'right') {
+
+ }
+
+ `,
+})
+export class CheckboxCustomLabelComponent {
+ @Input() label = 'Checkbox';
+ @Input() caption = 'caption';
+ @Input() labelPosition: 'left' | 'right' = 'left';
+ @Input() invalid = false;
+ @Input() disabled = false;
+ @Input() inputId = 'custom-checkbox';
+
+ formControl = new FormControl(false);
+
+ get labelClass(): string {
+ return this.disabled ? 'checkbox-label checkbox-label--disabled' : 'checkbox-label';
+ }
+
+ get captionClass(): string {
+ return this.disabled ? 'checkbox-caption checkbox-caption--disabled' : 'checkbox-caption';
+ }
+
+ ngOnChanges(): void {
+ if (this.disabled) {
+ this.formControl.disable();
+ } else {
+ this.formControl.enable();
+ }
+ }
+}
+
+export const CustomLabel: StoryObj = {
+ render: (args) => ({
+ props: { ...args, checked: false },
+ template: `
+
+ @if (labelPosition === 'left') {
+
+ }
+
+
+ @if (caption) {
+ {{ caption }}
+ }
+
+ @if (labelPosition === 'right') {
+
+ }
+
+ \`,
+})
+export class CheckboxCustomLabelComponent implements OnChanges {
+ @Input() label = 'Checkbox';
+ @Input() caption = 'caption';
+ @Input() labelPosition: 'left' | 'right' = 'left';
+ @Input() invalid = false;
+ @Input() disabled = false;
+ @Input() inputId = 'custom-checkbox';
+
+ formControl = new FormControl(false);
+
+ get labelClass(): string {
+ return this.disabled ? 'checkbox-label checkbox-label--disabled' : 'checkbox-label';
+ }
+
+ get captionClass(): string {
+ return this.disabled ? 'checkbox-caption checkbox-caption--disabled' : 'checkbox-caption';
+ }
+
+ ngOnChanges(): void {
+ if (this.disabled) {
+ this.formControl.disable();
+ } else {
+ this.formControl.enable();
+ }
+ }
+}
+ `,
+ },
+ },
+ },
+};
diff --git a/src/stories/components/checkbox/examples/checkbox-disabled.component.ts b/src/stories/components/checkbox/examples/checkbox-disabled.component.ts
new file mode 100644
index 00000000..6467a14c
--- /dev/null
+++ b/src/stories/components/checkbox/examples/checkbox-disabled.component.ts
@@ -0,0 +1,52 @@
+import { Component } from '@angular/core';
+import { FormsModule } from '@angular/forms';
+import { StoryObj } from '@storybook/angular';
+import { CheckboxComponent } from '../../../../lib/components/checkbox/checkbox.component';
+
+const styles = '';
+
+@Component({
+ selector: 'app-checkbox-disabled',
+ standalone: true,
+ imports: [CheckboxComponent, FormsModule],
+ styles,
+ template: `
+