Skip to content

Commit

Permalink
(feat) Tweak editor action button behaviour (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Aug 9, 2023
1 parent dde0e4b commit a4d2a64
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/components/schema-editor/schema-editor.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,28 @@ const SchemaEditor: React.FC<SchemaEditorProps> = ({
/>
) : null}

{isNewSchema ? (
{isNewSchema && !stringifiedSchema ? (
<Button kind="secondary" onClick={inputDummySchema}>
{t("inputDummySchema", "Input dummy schema")}
</Button>
) : null}

<Button
disabled={isRendering}
kind="primary"
onClick={renderSchemaChanges}
>
{isRendering ? (
<InlineLoading
className={styles.spinner}
description={t("rendering", "Rendering") + "..."}
/>
) : (
<span>{t("renderChanges", "Render changes")}</span>
)}
</Button>
{schema ? (
<Button
disabled={isRendering}
kind="primary"
onClick={renderSchemaChanges}
>
{isRendering ? (
<InlineLoading
className={styles.spinner}
description={t("render", "Render" + "...")}
/>
) : (
<span>{t("renderChanges", "Render changes")}</span>
)}
</Button>
) : null}
</div>

{invalidJsonErrorMessage ? (
Expand Down

0 comments on commit a4d2a64

Please sign in to comment.