chore: avoid memo override exported component displayName

This commit is contained in:
unix
2020-04-29 15:11:49 +08:00
parent c53abeca7b
commit 869154175f
78 changed files with 325 additions and 239 deletions

View File

@@ -45,7 +45,7 @@ const getStatusColor = (type: NormalTypes, filled: boolean, theme: ZeitUIThemes)
}
}
export const Note: React.FC<React.PropsWithChildren<NoteProps>> = React.memo(({
export const Note: React.FC<React.PropsWithChildren<NoteProps>> = ({
children, type, label, filled, small, className, ...props
}) => {
const theme = useTheme()
@@ -88,7 +88,9 @@ export const Note: React.FC<React.PropsWithChildren<NoteProps>> = React.memo(({
</div>
)
})
}
export default withDefaults(Note, defaultProps)
const MemoNote = React.memo(Note)
export default withDefaults(MemoNote, defaultProps)