Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ export function Instruction({ commands, paramValues, textPost, textPre }) {
post = <Content className="kuiVerticalRhythm" text={textPost}/>;
}

const aceOptions = {
fontSize: '14px',
maxLines: commands.length
};

return (
<div className="instruction">

{pre}

let commandsMarkup;
if (commands) {
const aceOptions = {
fontSize: '14px',
maxLines: commands.length
};
commandsMarkup = (
<div className="kuiVerticalRhythm">
<KuiCodeEditor
mode="sh"
Expand All @@ -39,15 +36,22 @@ export function Instruction({ commands, paramValues, textPost, textPre }) {
isReadOnly
/>
</div>
);
}

return (
<div className="instruction">

{pre}
{commandsMarkup}
{post}

</div>
);
}

Instruction.propTypes = {
commands: PropTypes.array.isRequired,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should stay but just remove the .isRequired

commands: PropTypes.array,
paramValues: PropTypes.object.isRequired,
textPost: PropTypes.string,
textPre: PropTypes.string,
Expand Down