All files / stories/NativeFrameworkRendering/angular-components disabled.component.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                                        6x 6x              
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
 
@Component({
  selector: 'app-disabled',
  standalone: true,
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <div>
      <vg-dropdown
        label="Disabled Dropdown"
        placeholder="Cannot select"
        value="option2"
        helper-text="This field is currently disabled"
        [options]="sampleOptions"
        disabled
        data-testid="disabled-dropdown"
      ></vg-dropdown>
    </div>
  `,
})
export class DisabledComponent {
  public sampleOptions = [
    { label: 'Option 1', value: 'option1', description: 'First option' },
    { label: 'Option 2', value: 'option2', description: 'Second option' },
    { label: 'Option 3', value: 'option3', description: 'Third option' },
    { label: 'Disabled Option', value: 'disabled', description: 'This option is disabled', disabled: true },
  ]
}