1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

remove react old defaultProps (#7576)

This commit is contained in:
Michael An
2025-03-10 14:27:08 +08:00
committed by GitHub
parent 00707d1d05
commit 55719ccbdf
43 changed files with 214 additions and 438 deletions

View File

@@ -50,10 +50,6 @@ export default class Toast extends React.PureComponent {
isShown: PropTypes.bool
};
static defaultProps = {
intent: 'none'
};
state = {
isShown: true,
};
@@ -145,7 +141,7 @@ export default class Toast extends React.PureComponent {
>
<div ref={this.onRef} style={{ padding: 8 }}>
<Alert
intent={this.props.intent}
intent={this.props.intent || 'none'}
title={this.props.title}
children={this.props.children || ''}
isRemovable={this.props.hasCloseButton}