Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d5723c9

Browse files
Add some JSDoc to defaultMapThemrProps
1 parent 8def688 commit d5723c9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/components/themr.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) =>
157157

158158
/**
159159
* Merges passed themes by concatenating string keys and processing nested themes
160+
*
160161
* @param {...TReactCSSThemrTheme} themes - Themes
161162
* @returns {TReactCSSThemrTheme} - Resulting theme
162163
*/
@@ -253,6 +254,7 @@ function merge(original = {}, mixin = {}) {
253254

254255
/**
255256
* Validates compose option
257+
*
256258
* @param {String|Boolean} composeTheme - Compose them option
257259
* @throws
258260
* @returns {undefined}
@@ -269,6 +271,7 @@ function validateComposeOption(composeTheme) {
269271

270272
/**
271273
* Removes namespace from key
274+
*
272275
* @param {String} key - Key
273276
* @param {String} themeNamespace - Theme namespace
274277
* @returns {String} - Key
@@ -278,6 +281,14 @@ function removeNamespace(key, themeNamespace) {
278281
return capitalized.slice(0, 1).toLowerCase() + capitalized.slice(1)
279282
}
280283

284+
/**
285+
* Maps props and theme to an object that will be used to pass down props to the
286+
* decorated component.
287+
*
288+
* @param {Object} ownProps - All props given to the decorated component
289+
* @param {Object} theme - Calculated then that should be passed down
290+
* @returns {Object} - Props that will be passed down to the decorated component
291+
*/
281292
function defaultMapThemrProps(ownProps, theme) {
282293
const {
283294
composeTheme, //eslint-disable-line no-unused-vars

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /