@ruc-lib/knob 2.0.1 → 3.1.0

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
@@ -18,31 +18,38 @@ If you only need the Knob component
18
18
  npm install @ruc-lib/knob
19
19
  ```
20
20
 
21
- ## Usage
22
- ### 1. Import the Module
23
- In your Angular module file (e.g., `app.module.ts`), import the `RuclibKnobModule`:
24
21
 
25
- ```typescript
26
- // For Complete Library
27
- import { RuclibKnobModule } from '@uxpractice/ruc-lib/knob';
28
-
29
- // For Individual Package
30
- import { RuclibKnobModule } from '@ruc-lib/knob';
31
-
32
- import { AppComponent } from './app.component';
33
- import { NgModule } from '@angular/core';
34
- import { BrowserModule } from '@angular/platform-browser';
35
-
36
- @NgModule({
37
- declarations: [AppComponent],
38
- imports: [
39
- BrowserModule,
40
- RuclibKnobModule
41
- ],
42
- providers: [],
43
- bootstrap: [AppComponent]
44
- })
45
- export class AppModule {}
22
+ # Version Compatibility
23
+
24
+ Please ensure you install the correct version of `@ruc-lib/knob` based on your Angular version.
25
+
26
+ | Angular Version | Compatible `@ruc-lib/knob` Version |
27
+ |--------------------|------------------------------------------------------|
28
+ | 15.x.x | `npm install @ruc-lib/knob@^3.0.0` |
29
+ | 16.x.x | `npm install @ruc-lib/knob@^3.0.0` |
30
+
31
+
32
+ ## Usage
33
+ ### 1. Import the Component
34
+ In your Angular component file (e.g., `app.component.ts`), import the `RuclibKnobComponent`:
35
+
36
+ ```typescript
37
+ import { Component } from '@angular/core';
38
+
39
+ // For Complete Library
40
+ import { RuclibKnobComponent } from '@uxpractice/ruc-lib/knob';
41
+
42
+ // For Individual Package
43
+ import { RuclibKnobComponent } from '@ruc-lib/knob';
44
+
45
+ @Component({
46
+ selector: 'app-root',
47
+ imports: [RuclibKnobComponent],
48
+ templateUrl: './app.component.html',
49
+ })
50
+ export class AppComponent {
51
+ // Component code here
52
+ }
46
53
  ```
47
54
 
48
55
  ### 2. Use the Component
@@ -149,6 +156,23 @@ export class AppComponent {
149
156
  }
150
157
  ```
151
158
 
159
+ > ⚠️ **IMPORTANT: Custom Theme Usage in Angular Material**
160
+
161
+ When implementing **custom themes**, such as:
162
+
163
+ ```scss
164
+ .custom-theme-1 {
165
+ @include angular-material-theme($custom-theme);
166
+ }
167
+
168
+ // You must also include the typography mixin to ensure text styles are applied correctly as shown below:
169
+ .custom-theme-1 {
170
+ @include angular-material-theme($custom-theme);
171
+ @include mat.typography-level($theme-custom-typography-name, body-1);
172
+ }
173
+ ```
174
+
175
+
152
176
  ## Contribution
153
177
 
154
178
  Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.