Skip to content

Commit

Permalink
theming doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hasith committed Sep 6, 2024
1 parent 380dad5 commit f345900
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions docs/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The Product-led library allows users to customize the look and feel of its compo

The library's default theme consists of the following properties:

```typescript
export const defaultTheme: Theme = {
```css

primaryColor: '#3498db',
secondaryColor: '#2ecc71',
backgroundColor: '#ffffff',
Expand All @@ -28,7 +28,6 @@ export const defaultTheme: Theme = {
successColor: '#2ecc71',
warningColor: '#f39c12',
infoColor: '#3498db',
};
```

## Overriding the Default Theme
Expand All @@ -53,4 +52,16 @@ To dynamically update the theme in your application, use the following method:
Productled.getInstance().applyCustomTheme(customTheme: Partial<Theme>);
```

This method allows you to pass a custom theme object to override the default or previously applied theme properties. You only need to provide the properties you want to change.
example:

```typescript
const customTheme = {
primaryColor: '#ff0000',
secondaryColor: '#00ff00',
// ... other theme properties
};

Productled.getInstance().applyCustomTheme(customTheme);
```

This method allows you to pass a custom theme object to override the default or previously applied theme properties. You only need to provide the properties you want to change.

0 comments on commit f345900

Please sign in to comment.