Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
import InputMultiText from "../../InputMultiText";
|
||||
import { t as i18nT } from "i18next";
|
||||
|
||||
export default function PreviewInputMultiText() {
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputMultiText name="name" title={i18nT("components.input.preview.title")} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputText() {
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText name="name" title={i18nT("components.input.preview.title")} defaultValue="" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithAllOptions() {
|
||||
const [value, setValue] = useState("");
|
||||
return (
|
||||
<div id="input-text-with-all-options">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText name="name" title={i18nT("components.input.preview.title")} value={value} setValue={setValue} minLength={0} maxLength={10} required />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
import { t as i18nT } from "i18next";
|
||||
|
||||
export default function PreviewInputTextWithHint() {
|
||||
return (
|
||||
<div id="input-text-with-hint-and-help">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<InputText
|
||||
name="name"
|
||||
title={i18nT("components.input.preview.title")}
|
||||
hint={<span className="text-red-600">{i18nT("components.input.preview.hintText")}</span>}
|
||||
defaultValue=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
import { renderSanitizedMarkdown } from "~/utils/html-sanitizer";
|
||||
|
||||
export default function PreviewInputTextWithMonacoEditor() {
|
||||
const { t } = useTranslation();
|
||||
const [markdownValue, setMarkdownValue] = useState(
|
||||
() => `
|
||||
# ${t("components.previewInputs.markdownEditor")}
|
||||
|
||||
## ${t("components.previewInputs.title1")}
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
|
||||
_Image_:
|
||||
|
||||
)})
|
||||
`
|
||||
);
|
||||
return (
|
||||
<div id="input-text">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<div className="sm:grid sm:grid-cols-2 sm:gap-2">
|
||||
<InputText
|
||||
className="h-64"
|
||||
name="editor"
|
||||
title={t("components.previewInputs.editor")}
|
||||
editor="monaco"
|
||||
editorLanguage="markdown"
|
||||
editorHideLineNumbers={true}
|
||||
value={markdownValue}
|
||||
setValue={setMarkdownValue}
|
||||
/>
|
||||
|
||||
<div className="h-64 space-y-1 overflow-auto">
|
||||
{/* Caption for a read-only rendered-markdown region, not a form control. */}
|
||||
<div className="text-muted-foreground text-xs font-medium">{t("shared.preview")}</div>
|
||||
<div className="prose border-border rounded-md border-2 border-dashed p-6">
|
||||
<div dangerouslySetInnerHTML={{ __html: renderSanitizedMarkdown(markdownValue) }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { useState } from "react";
|
||||
import { t as i18nT } from "i18next";
|
||||
import InputText from "~/components/ui/input/InputText";
|
||||
|
||||
export default function PreviewInputTextWithTranslation() {
|
||||
const [valid, setValid] = useState("shared.hi");
|
||||
const [invalid, setInvalid] = useState("shared.invalid.i18n.key");
|
||||
return (
|
||||
<div id="input-text-with-translations">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
<div className="space-y-2">
|
||||
<InputText name="name" title={i18nT("components.input.preview.validI18nKey")} value={valid} setValue={setValid} withTranslation />
|
||||
<InputText name="name" title={i18nT("components.input.preview.invalidI18nKey")} value={invalid} setValue={setInvalid} withTranslation />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user