@swisspost/design-system-components-angular 10.0.0-next.47 → 10.0.0-next.49

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
@@ -16,22 +16,36 @@ Install the package in your Angular project:
16
16
  npm install @swisspost/design-system-components-angular
17
17
  ```
18
18
 
19
- In your `app.module.ts`, add the components to your imports:
19
+ In your `app.config.ts` file, add the provider:
20
20
 
21
21
  ```typescript
22
22
  // Other imports ....
23
- import { PostComponentsModule } from '@swisspost/design-system-components-angular';
23
+ import { providePostComponents } from '@swisspost/design-system-components-angular';
24
24
 
25
- @NgModule({
26
- imports: [PostComponentsModule],
25
+ export const appConfig: ApplicationConfig = {
26
+ providers: [
27
+ providePostComponents(),
28
+ ]
29
+ };
30
+
31
+ Import the components you need directly into your standalone component:
32
+
33
+ ```typescript
34
+ import { PostIcon, PostButton } from '@swisspost/design-system-components-angular';
35
+
36
+ @Component({
37
+ standalone: true,
38
+ selector: 'my-component',
39
+ template: `
40
+ <post-button>
41
+ <post-icon></post-icon>
42
+ </post-button>
43
+ `,
44
+ imports: [PostIcon, PostButton]
27
45
  })
28
- export class AppModule {}
46
+ export class MyComponent {}
29
47
  ```
30
48
 
31
- In your templates, the components are available as:
32
-
33
- ```html
34
- <post-icon></post-icon>
35
49
  ```
36
50
 
37
51
  ## Contribute