Skip to content

Commit

Permalink
chore(CHANGELOG.md): updating doc before publishing package
Browse files Browse the repository at this point in the history
  • Loading branch information
willmendesneto committed Feb 4, 2023
1 parent c175089 commit 136a784
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,50 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- Adding support for extending global theme added via `NgxSkeletonLoaderModule.forRoot({ theme: /* ...list of CSS atributes */} })`

By default when using `NgxSkeletonLoaderModule.forRoot({ theme: /* ...list of CSS atributes */} })` the application is using this value as source of truth, overriding any local theming passed to `<ngx-skeleton-loader>` component via `[theme]` input.

By using `NgxSkeletonLoaderModule.forRoot({ theme: { extendsFromRoot: true, /* ...list of CSS atributes */} })` in your application, you should also be aware that:

- By default, every `<ngx-skeleton-loader>` component will use `theme` coming from `NgxSkeletonLoaderModule.forRoot()` as the source of truth
- If there's any CSS attribute on the component locally which overrides the CSS spec, it combines both themes, but overriding global CSS attributes in favor of local ones.

```html
<!--
// ... E.G: App is using this configuration below
NgxSkeletonLoaderModule.forRoot({
theme: {
// Enabliong theme combination
extendsFromRoot: true,
// ... list of CSS theme attributes
height: '30px',
},
}),
-->

<div class="item">
<ngx-skeleton-loader></ngx-skeleton-loader>
<!-- above line will produce a skeleton component using `height: 30px;`" -->
<ngx-skeleton-loader [theme]="{background: 'blue'}"></ngx-skeleton-loader>
<!-- above line will produce a skeleton component using `height: 30px; background: blue;`" -->
<ngx-skeleton-loader [theme]="{height: '50px', background: 'red'}"></ngx-skeleton-loader>
<!-- above line will produce a skeleton component using `height: 50px; background: red;`" -->
</div>
```

- Adding new `custom-content` appearance. From now on, consumers can now add their own content inside `<ng-skeleton-loader></ng-skeleton-loader>` component. So that, they can add some custom content, such as SVG, as an example
- Adding examples for `custom-content` usage

### Updated

- Updagrading module to Angular v15

### Fixed

- Removing build warnings

## [6.0.0][] - 2022-08-18

### Updated
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class YourAppComponent {}
This method is also accepting the option of having a global theme and local theme inputs. You can enable it by passing `NgxSkeletonLoaderModule.forRoot({ theme: { extendsFromRoot: true, /* ...list of CSS atributes */} })` in your module. Quite simple, right? 😄

By using that configuration in yuor application, you should also be aware that:
By using that configuration in your application, you should also be aware that:

- By default, every `<ngx-skeleton-loader>` component will use `theme` coming from `NgxSkeletonLoaderModule.forRoot()` as the source of truth
- If there's any CSS attribute on the component locally which overrides the CSS spec, it combines both themes, but overriding global CSS attributes in favor of local ones.
Expand All @@ -149,7 +149,7 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
// ... list of CSS theme attributes
height: '30px',
},
}),,
}),
...
],
providers: [],
Expand Down

0 comments on commit 136a784

Please sign in to comment.