);
}
return ;
}
render() {
const {
action,
buttonText,
collapsed,
completed,
completedDescription,
completedButtonText,
completedTitle,
description,
duration,
forceCollapsed,
href,
isButtonDisabled,
inProgress,
isWarning,
noticeText,
onClick,
target,
title,
translate,
onDismiss,
showSkip,
} = this.props;
const _collapsed = forceCollapsed || collapsed;
// A task that's being automatically completed ("in progress") cannot be expanded.
// An uncompleted task by definition has a call-to-action, which can only be accessed by
// expanding it, so an uncompleted task is always expandable.
// A completed task may or may not have a call-to-action, which can be best inferred from
// the `completedButtonText` prop.
const isExpandable =
! forceCollapsed || ( ! inProgress && ( ! completed || completedButtonText ) );
const taskActionButtonText = completed
? completedButtonText
: buttonText || translate( 'Try it' );
return (