Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: Change the way we handle static stylesheet
Previously we deduped duplicate styles from being added to the document.head by only adding the own method of a component. This time we keep a reference to the static function in a seen array and only call it once. We expose a new static method called `registerStyles()` which can be called by any child class that wants to inherit and overwrite styles For example ```js class MyDialog extends Dialog { static stylesheet () { Tonic.registerStyles(super.stylesheet) return 'CSS' } } ```
- Loading branch information