-
Notifications
You must be signed in to change notification settings - Fork 15
Support Theming #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Support Theming #35
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
923892c
Add theming and prop-types dependencies
lttb ed59cd7
Stub flow-typed for theming and prop-types
lttb 858601d
Create basic support for theming out of the box
lttb 386f756
Add tests for theming
lttb f5f73c1
Fix theming unsubscribe type and state type
lttb 032c410
Merge remote-tracking branch 'origin/master' into feature/theming
lttb 1dc359e
Support composable styles and upgrade theming
lttb 2dd5de9
Update README.md for theming and composable styles
lttb 802f620
Move theme from context to style props
lttb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| // flow-typed signature: 15f1dbaabcfdc41488335743c4ebcc75 | ||
| // flow-typed version: <<STUB>>/prop-types_v15.5.10/flow_v0.44.2 | ||
|
|
||
| /** | ||
| * This is an autogenerated libdef stub for: | ||
| * | ||
| * 'prop-types' | ||
| * | ||
| * Fill this stub out by replacing all the `any` types. | ||
| * | ||
| * Once filled out, we encourage you to share your work with the | ||
| * community by sending a pull request to: | ||
| * https://github.com/flowtype/flow-typed | ||
| */ | ||
|
|
||
| declare module 'prop-types' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| /** | ||
| * We include stubs for each file inside this npm package in case you need to | ||
| * require those files directly. Feel free to delete any files that aren't | ||
| * needed. | ||
| */ | ||
| declare module 'prop-types/checkPropTypes' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/factory' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/factoryWithThrowingShims' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/factoryWithTypeCheckers' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/lib/ReactPropTypesSecret' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/prop-types' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'prop-types/prop-types.min' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| // Filename aliases | ||
| declare module 'prop-types/checkPropTypes.js' { | ||
| declare module.exports: $Exports<'prop-types/checkPropTypes'>; | ||
| } | ||
| declare module 'prop-types/factory.js' { | ||
| declare module.exports: $Exports<'prop-types/factory'>; | ||
| } | ||
| declare module 'prop-types/factoryWithThrowingShims.js' { | ||
| declare module.exports: $Exports<'prop-types/factoryWithThrowingShims'>; | ||
| } | ||
| declare module 'prop-types/factoryWithTypeCheckers.js' { | ||
| declare module.exports: $Exports<'prop-types/factoryWithTypeCheckers'>; | ||
| } | ||
| declare module 'prop-types/index' { | ||
| declare module.exports: $Exports<'prop-types'>; | ||
| } | ||
| declare module 'prop-types/index.js' { | ||
| declare module.exports: $Exports<'prop-types'>; | ||
| } | ||
| declare module 'prop-types/lib/ReactPropTypesSecret.js' { | ||
| declare module.exports: $Exports<'prop-types/lib/ReactPropTypesSecret'>; | ||
| } | ||
| declare module 'prop-types/prop-types.js' { | ||
| declare module.exports: $Exports<'prop-types/prop-types'>; | ||
| } | ||
| declare module 'prop-types/prop-types.min.js' { | ||
| declare module.exports: $Exports<'prop-types/prop-types.min'>; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| // flow-typed signature: 0b2dbbd7a0e7a4a61efa8f5cb564e5d5 | ||
| // flow-typed version: <<STUB>>/theming_v1.1.0/flow_v0.44.2 | ||
|
|
||
| /** | ||
| * This is an autogenerated libdef stub for: | ||
| * | ||
| * 'theming' | ||
| * | ||
| * Fill this stub out by replacing all the `any` types. | ||
| * | ||
| * Once filled out, we encourage you to share your work with the | ||
| * community by sending a pull request to: | ||
| * https://github.com/flowtype/flow-typed | ||
| */ | ||
|
|
||
| declare module 'theming' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| /** | ||
| * We include stubs for each file inside this npm package in case you need to | ||
| * require those files directly. Feel free to delete any files that aren't | ||
| * needed. | ||
| */ | ||
| declare module 'theming/dist/cjs/channel' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/cjs/create-theme-listener' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/cjs/create-theme-provider' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/cjs/create-with-theme' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/cjs/index' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/esm/channel' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/esm/create-theme-listener' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/esm/create-theme-provider' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/esm/create-with-theme' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/dist/esm/index' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/channel' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-theme-listener' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-theme-listener.test' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-theme-provider' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-theme-provider.test' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-with-theme' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/create-with-theme.test' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/index' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/index.test' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| declare module 'theming/src/test-helpers' { | ||
| declare module.exports: any; | ||
| } | ||
|
|
||
| // Filename aliases | ||
| declare module 'theming/dist/cjs/channel.js' { | ||
| declare module.exports: $Exports<'theming/dist/cjs/channel'>; | ||
| } | ||
| declare module 'theming/dist/cjs/create-theme-listener.js' { | ||
| declare module.exports: $Exports<'theming/dist/cjs/create-theme-listener'>; | ||
| } | ||
| declare module 'theming/dist/cjs/create-theme-provider.js' { | ||
| declare module.exports: $Exports<'theming/dist/cjs/create-theme-provider'>; | ||
| } | ||
| declare module 'theming/dist/cjs/create-with-theme.js' { | ||
| declare module.exports: $Exports<'theming/dist/cjs/create-with-theme'>; | ||
| } | ||
| declare module 'theming/dist/cjs/index.js' { | ||
| declare module.exports: $Exports<'theming/dist/cjs/index'>; | ||
| } | ||
| declare module 'theming/dist/esm/channel.js' { | ||
| declare module.exports: $Exports<'theming/dist/esm/channel'>; | ||
| } | ||
| declare module 'theming/dist/esm/create-theme-listener.js' { | ||
| declare module.exports: $Exports<'theming/dist/esm/create-theme-listener'>; | ||
| } | ||
| declare module 'theming/dist/esm/create-theme-provider.js' { | ||
| declare module.exports: $Exports<'theming/dist/esm/create-theme-provider'>; | ||
| } | ||
| declare module 'theming/dist/esm/create-with-theme.js' { | ||
| declare module.exports: $Exports<'theming/dist/esm/create-with-theme'>; | ||
| } | ||
| declare module 'theming/dist/esm/index.js' { | ||
| declare module.exports: $Exports<'theming/dist/esm/index'>; | ||
| } | ||
| declare module 'theming/src/channel.js' { | ||
| declare module.exports: $Exports<'theming/src/channel'>; | ||
| } | ||
| declare module 'theming/src/create-theme-listener.js' { | ||
| declare module.exports: $Exports<'theming/src/create-theme-listener'>; | ||
| } | ||
| declare module 'theming/src/create-theme-listener.test.js' { | ||
| declare module.exports: $Exports<'theming/src/create-theme-listener.test'>; | ||
| } | ||
| declare module 'theming/src/create-theme-provider.js' { | ||
| declare module.exports: $Exports<'theming/src/create-theme-provider'>; | ||
| } | ||
| declare module 'theming/src/create-theme-provider.test.js' { | ||
| declare module.exports: $Exports<'theming/src/create-theme-provider.test'>; | ||
| } | ||
| declare module 'theming/src/create-with-theme.js' { | ||
| declare module.exports: $Exports<'theming/src/create-with-theme'>; | ||
| } | ||
| declare module 'theming/src/create-with-theme.test.js' { | ||
| declare module.exports: $Exports<'theming/src/create-with-theme.test'>; | ||
| } | ||
| declare module 'theming/src/index.js' { | ||
| declare module.exports: $Exports<'theming/src/index'>; | ||
| } | ||
| declare module 'theming/src/index.test.js' { | ||
| declare module.exports: $Exports<'theming/src/index.test'>; | ||
| } | ||
| declare module 'theming/src/test-helpers.js' { | ||
| declare module.exports: $Exports<'theming/src/test-helpers'>; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export default class StyledJssError extends Error { | ||
| constructor(message: string) { | ||
| super(message) | ||
|
|
||
| this.message = message | ||
| this.name = 'StyledJssError' | ||
|
|
||
| Error.captureStackTrace(this, StyledJssError) | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use consistent style, I would rather go for camel case