-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into preview/1609-new-date
- Loading branch information
Showing
12 changed files
with
260 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
libs/ui-watt/src/lib/components/checkbox/+storybook/storybook-checkbox-required.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Energinet DataHub A/S | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License2"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { Component, OnInit, inject } from '@angular/core'; | ||
import { FormGroup, FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; | ||
import { WattCheckboxComponent } from '../watt-checkbox.component'; | ||
import { WattButtonComponent } from '../../button/watt-button.component'; | ||
|
||
@Component({ | ||
selector: 'watt-storybook-checkbox-required', | ||
standalone: true, | ||
imports: [ReactiveFormsModule, WattCheckboxComponent, WattButtonComponent], | ||
template: ` | ||
<form [formGroup]="form"> | ||
<watt-checkbox formControlName="checkbox">Approve this</watt-checkbox> | ||
<watt-button variant="primary" type="submit">Submit</watt-button> | ||
</form> | ||
`, | ||
styles: [], | ||
}) | ||
export class StoryBookCheckboxRequiredComponent implements OnInit { | ||
formBuilder = inject(FormBuilder); | ||
form!: FormGroup; | ||
|
||
ngOnInit() { | ||
this.form = this.formBuilder.group({ | ||
checkbox: [null, [Validators.requiredTrue]], | ||
}); | ||
} | ||
} |
65 changes: 0 additions & 65 deletions
65
libs/ui-watt/src/lib/components/checkbox/+storybook/storybook-checkbox-states.component.html
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
libs/ui-watt/src/lib/components/checkbox/+storybook/storybook-checkbox-states.component.scss
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
libs/ui-watt/src/lib/components/checkbox/+storybook/storybook-checkbox-states.component.ts
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
libs/ui-watt/src/lib/components/checkbox/+storybook/storybook-checkbox-states.stories.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
libs/ui-watt/src/lib/components/checkbox/watt-checkbox.component.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.