Files
helm-dashboard/frontend/src/components/modal/InstallChartModal/ChartValues.tsx
T
yuri-sakharov c9b8fb7809 Introduced tsconfig.app.json and tsconfig.base.json + Refactored eslint.config.js to the latest structure (#652)
* Introduced tsconfig.app.json and tsconfig.base.json

* yarn.lock

* Introduced tsconfig.app.json, tsconfig.base.jsonfig.

* Refactored eslint.config.js to latest structure

* Returned previous recommended rules.

* More rules

* Force import rules

* Check

* Check

* Cleanup ESLint configuration and plugins

* Cleanup heap: "writable",DD_RUM: "writable" from ESLint configuration

* "scripts" moved to the top of package.json
2026-02-15 17:41:04 +00:00

44 lines
1.1 KiB
TypeScript

import hljs from "highlight.js/lib/core";
import yaml from "highlight.js/lib/languages/yaml";
import Spinner from "../../Spinner";
hljs.registerLanguage("yaml", yaml);
export const ChartValues = ({
chartValues,
loading,
}: {
chartValues: string;
loading: boolean;
}) => {
return (
<div className="w-1/2">
<label
className="mb-2 block text-xl font-medium tracking-wide text-gray-700"
htmlFor="grid-user-defined-values"
>
Chart Value Reference:
</label>
<pre
className="block max-h-[330px] w-full overflow-y-auto rounded-sm bg-chart-values p-2 font-sf-mono text-base font-medium"
dangerouslySetInnerHTML={
chartValues && !loading
? {
__html: hljs.highlight(chartValues, {
language: "yaml",
}).value,
}
: undefined
}
>
{loading ? (
<Spinner />
) : !chartValues && !loading ? (
"No original values information found"
) : null}
</pre>
</div>
);
};