diff --git a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx index b239eabecf..4318f45a8d 100644 --- a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx +++ b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx @@ -1,37 +1,12 @@ -import {ReadOutlined} from '@ant-design/icons'; -import {FramedCodeBlock} from 'components/CodeBlock'; -import * as S from './CliCommand.styled'; -import Controls from './Controls'; +import {withCustomization} from 'providers/Customization'; import useCliCommand from './hooks/useCliCommand'; import {IMethodChildrenProps} from '../../RunDetailAutomateMethods'; +import Command from './Command'; -const CLiCommand = ({id, variableSetId, fileName = '', resourceType, docsUrl}: IMethodChildrenProps) => { +const CLiCommand = (props: IMethodChildrenProps) => { const {command, onGetCommand} = useCliCommand(); - return ( - - - CLI Configuration - - - - - - - - ); + return ; }; -export default CLiCommand; +export default withCustomization(CLiCommand, 'cliCommand'); diff --git a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Command.tsx b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Command.tsx new file mode 100644 index 0000000000..f2aa12342d --- /dev/null +++ b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Command.tsx @@ -0,0 +1,40 @@ +import {ReadOutlined} from '@ant-design/icons'; +import {FramedCodeBlock} from 'components/CodeBlock'; +import {TCliCommandConfig} from 'services/CliCommand.service'; +import * as S from './CliCommand.styled'; +import Controls from './Controls'; +import {IMethodChildrenProps} from '../../RunDetailAutomateMethods'; + +interface IProps extends IMethodChildrenProps { + command: string; + onGetCommand(config: TCliCommandConfig): void; +} + +const Command = ({id, variableSetId, fileName = '', resourceType, docsUrl, command, onGetCommand}: IProps) => { + return ( + + + CLI Configuration + + + + + + + + ); +}; + +export default Command;