mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* converting app-preferences to use di Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * address review comments and fix lint Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * use compact license header Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
35 lines
918 B
TypeScript
35 lines
918 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { SubTitle } from "../layout/sub-title";
|
|
import type { AppPreferenceRegistration } from "./app-preferences/app-preference-registration";
|
|
import React from "react";
|
|
import { cssNames } from "../../../renderer/utils";
|
|
|
|
interface ExtensionSettingsProps {
|
|
setting: AppPreferenceRegistration;
|
|
size: "small" | "normal"
|
|
}
|
|
|
|
export function ExtensionSettings({ setting, size }: ExtensionSettingsProps) {
|
|
const {
|
|
title,
|
|
id,
|
|
components: { Hint, Input },
|
|
} = setting;
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<section id={id} className={cssNames(size)}>
|
|
<SubTitle title={title} />
|
|
<Input />
|
|
<div className="hint">
|
|
<Hint />
|
|
</div>
|
|
</section>
|
|
<hr className={cssNames(size)} />
|
|
</React.Fragment>
|
|
);
|
|
}
|