1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00
portainer/app/react/edge/edge-stacks/CreateView/DockerContentField.tsx
LP B 7a35b5b0e4
Some checks are pending
Label Conflicts / triage (push) Waiting to run
refactor(ui/code-editor): accept enum type (#22)
Co-authored-by: Chaim Lev-Ari <chaim.levi-ari@portainer.io>
2024-10-14 13:52:51 +02:00

36 lines
810 B
TypeScript

import { WebEditorForm } from '@@/WebEditorForm';
export function DockerContentField({
error,
onChange,
readonly,
value,
}: {
value: string;
onChange: (value: string) => void;
error?: string;
readonly?: boolean;
}) {
return (
<WebEditorForm
id="stack-creation-editor"
value={value}
onChange={onChange}
type="yaml"
placeholder="Define or paste the content of your docker compose file here"
error={error}
readonly={readonly}
data-cy="stack-creation-editor"
>
You can get more information about Compose file format in the{' '}
<a
href="https://docs.docker.com/compose/compose-file/"
target="_blank"
rel="noreferrer"
>
official documentation
</a>
.
</WebEditorForm>
);
}