This repository was archived by the owner on Mar 4, 2020. It is now read-only.
File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 9
9
ShorthandRenderFunction ,
10
10
ShorthandRenderer ,
11
11
} from '../types'
12
- // import { mergeStyles } from './mergeThemes'
12
+ import { mergeStyles } from './mergeThemes'
13
13
14
14
type HTMLTag = 'iframe' | 'img' | 'input'
15
15
type ShorthandProp = 'children' | 'src' | 'type'
@@ -250,17 +250,10 @@ function createShorthandFromValue<P>({
250
250
251
251
// Merge styles
252
252
if ( defaultProps . styles || overrideProps . styles || usersProps . styles ) {
253
- // As long as we allow the styles prop to be a function, I don't see how we can cache it, as the stirng of the function will always be mergeStyles..
254
- // ;(props as any).styles = mergeStyles(
255
- // defaultProps.styles,
256
- // usersProps.styles,
257
- // overrideProps.styles,
258
- // )
259
- // Just for hacking, relaying that it will always be an object, so we can cache...
260
- ; ( props as any ) . styles = _ . merge (
261
- defaultProps . styles || { } ,
262
- usersProps . styles || { } ,
263
- overrideProps . styles || { } ,
253
+ ; ( props as any ) . styles = mergeStyles (
254
+ defaultProps . styles ,
255
+ usersProps . styles ,
256
+ overrideProps . styles ,
264
257
)
265
258
}
266
259
You can’t perform that action at this time.
0 commit comments