support custom description render

This commit is contained in:
srgooglo 2022-10-07 20:11:33 +02:00
parent 4388e93caa
commit 30d2c26f34

View File

@ -200,9 +200,12 @@ export default class StepsForm extends React.Component {
</antd.Tag>
</div>
{current.description && <div className="description">
<Translation>
{t => t(current.description)}
</Translation>
{typeof current.description === "function" ?
React.createElement(current.description) :
<Translation>
{t => t(current.description)}
</Translation>
}
</div>}
{this.state.renderStep}
</div>