angular-tailwind-components 1.8.3-RC3 → 1.8.3-RC4

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
  ```
@@ -764,7 +764,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
764
764
  type: Directive,
765
765
  args: [{
766
766
  selector: '[tailwindSortHeader]',
767
- standalone: true,
768
767
  host: {
769
768
  class: 'cursor-pointer whitespace-nowrap text-left select-none hover:text-neutral-900',
770
769
  '[attr.tabindex]': '0',