32 lines
825 B
TypeScript
32 lines
825 B
TypeScript
import { Component, signal } from '@angular/core';
|
|
import { RouterOutlet } from '@angular/router';
|
|
import { Switch } from './components/switch/switch';
|
|
import { Dropdown, DropdownOption } from './components/dropdown/dropdown';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
imports: [RouterOutlet, Switch, Dropdown],
|
|
templateUrl: './app.html',
|
|
styleUrl: './app.scss'
|
|
})
|
|
export class App {
|
|
isToggled = signal(false);
|
|
|
|
dropdownOptions: DropdownOption[] = [
|
|
{ label: 'Option 1', value: 1 },
|
|
{ label: 'Option 2', value: 2 },
|
|
{ label: 'Option 3', value: 3 },
|
|
{ label: 'Option 4', value: 4 },
|
|
];
|
|
|
|
selectedDropdownValue = signal<any>(null);
|
|
|
|
handleToggle(state: boolean) {
|
|
console.log('Toggle state:', state);
|
|
}
|
|
|
|
handleDropdownChange(value: any) {
|
|
console.log('Dropdown value:', value);
|
|
}
|
|
}
|