angular-tailwind-components 1.8.3-RC3 → 1.8.3-RC5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,21 +44,25 @@ import { TailwindButton, TailwindInput, TailwindTextarea, TailwindToggle } from
44
44
 
45
45
  @Component({
46
46
  selector: 'app-example',
47
- standalone: true,
48
47
  imports: [TailwindButton, TailwindInput, TailwindTextarea, TailwindToggle],
49
48
  template: `
50
- <tailwind-input label="Email" placeholder="you@example.com" [(value)]="email" />
51
- <tailwind-textarea label="Notes" placeholder="Optional notes" [(value)]="notes" />
52
- <tailwind-toggle label="Notifications" [(checked)]="notifications" />
49
+ <form [formGroup]="form">
50
+ <tailwind-input label="Email" placeholder="you@example.com" [formControl]="form.controls.email" />
51
+ <tailwind-textarea label="Notes" placeholder="Optional notes" [formControl]="form.controls.notes" />
52
+ <tailwind-toggle label="Notifications" [formControl]="form.controls.notifications" />
53
53
  <tailwind-button variant="primary" (onClick)="submit()">Submit</tailwind-button>
54
+ </form>
54
55
  `
55
56
  })
56
57
  export class ExampleComponent {
57
- email = '';
58
- notes = '';
59
- notifications = true;
58
+ form = new FormGroup({
59
+ email: new FormControl(''),
60
+ notes: new FormControl(''),
61
+ notifications: new FormControl(false)
62
+ });
63
+
60
64
  submit() {
61
- /* ... */
65
+ console.log(this.form.value);
62
66
  }
63
67
  }
64
68
  ```