forked from cssinjs/jss
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(split)[react-jss] Add flow typings (cssinjs#818)
* First commit * Fixes on createHOC and injectSheet * More fixes on createHOC and injectSheet * Better flow typings on createHOC * Moved types/index.js just to types.js and added InnerProps and OuterProps utility types * Simplified typings of injectSheet.js * Updated and fixed some typings in createHOC.js - Used OuterProps and InnerProps types - Fixed the props of the returning component * Removed unnecessary types in ns.js * Added flow flag to some untyped files * Exporting StyleSheetFactoryOptions now instead of StyleSheetOptions * Fix typing of getDisplayName * Added Context Type and updated Options to use StyleSheetFactoryOptions type * Moved types/index.js just to types.js and added * Improved Context Type * Updated createHoc to use Context type * Improved typing of the Theming option * Formatted code with prettier * Updated size snapshot and lockfile * Make options in injectSheet optional an default it to an empty object * Fixed types of the JssProvider props - Made most props optional - Only allow one child * Remove semi eslint rule * Removed unnecessary types * Remove unnecessary check * Updated a if statement and fixed removing dynamic sheet from global registry after component unmounts * Fixed naming of some type names to always start with an uppercase char * Renamed generic types of createHOC
- Loading branch information
1 parent
2a7b697
commit a77f94d
Showing
13 changed files
with
161 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
import PropTypes from 'prop-types' | ||
import * as ns from './ns' | ||
import propTypes from './propTypes' | ||
|
This file contains 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 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 |
---|---|---|
@@ -1 +1,5 @@ | ||
export default Component => Component.displayName || Component.name || 'Component' | ||
// @flow | ||
import type {ComponentType} from 'react' | ||
|
||
export default <P>(Component: ComponentType<P>) => | ||
Component.displayName || Component.name || 'Component' |
This file contains 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
Oops, something went wrong.