fix(notifications) remove unused isDismissAllowed prop

This commit is contained in:
Saúl Ibarra Corretgé 2022-05-06 12:43:27 +02:00 committed by Saúl Ibarra Corretgé
parent e6ce5fd75f
commit 01bd18b86a
2 changed files with 6 additions and 17 deletions

View File

@ -61,11 +61,6 @@ export type Props = {
*/
icon?: String,
/**
* Whether or not the dismiss button should be displayed.
*/
isDismissAllowed: boolean,
/**
* Maximum lines of the description.
*/
@ -116,8 +111,7 @@ export default class AbstractNotification<P: Props> extends Component<P> {
* @static
*/
static defaultProps = {
appearance: NOTIFICATION_TYPE.NORMAL,
isDismissAllowed: true
appearance: NOTIFICATION_TYPE.NORMAL
};
/**

View File

@ -32,8 +32,6 @@ class Notification extends AbstractNotification<Props> {
* @returns {ReactElement}
*/
render() {
const { isDismissAllowed } = this.props;
return (
<View
pointerEvents = 'box-none'
@ -47,14 +45,11 @@ class Notification extends AbstractNotification<Props> {
}
</View>
</View>
{
isDismissAllowed
&& <TouchableOpacity onPress = { this._onDismissed }>
<Icon
src = { IconClose }
style = { styles.dismissIcon } />
</TouchableOpacity>
}
<TouchableOpacity onPress = { this._onDismissed }>
<Icon
src = { IconClose }
style = { styles.dismissIcon } />
</TouchableOpacity>
</View>
);
}