Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit a1d8cf4

Browse files
committed
fix(sc): fix withComponent
1 parent c990bc6 commit a1d8cf4

File tree

1 file changed

+7
-1
lines changed
  • packages/shared/core/styled-engine

1 file changed

+7
-1
lines changed

packages/shared/core/styled-engine/util.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ function patchStyledComponent(StyledComponent) {
1414
// eslint-disable-next-line no-underscore-dangle
1515
NewTarget.__smoothUIComponent = true
1616
return patchStyledComponent(
17-
Object.assign(baseWithComponent(NewTarget, ...args), StyledComponent),
17+
Object.assign(baseWithComponent(NewTarget, ...args), {
18+
defaultProps: StyledComponent.defaultProps,
19+
propTypes: StyledComponent.propTypes,
20+
displayName: StyledComponent.displayName,
21+
componentStyle: StyledComponent.componentStyle,
22+
styledComponentId: StyledComponent.styledComponentId,
23+
}),
1824
)
1925
}
2026

0 commit comments

Comments
 (0)