1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/features/preferences/renderer/compliance-for-legacy-extension-api/extension-preference-block.tsx
Janne Savolainen 81c748b7e8
Rename a preference item type to better communicate intent in UI
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-10-21 08:23:21 +03:00

36 lines
939 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { SubTitle } from "../../../../renderer/components/layout/sub-title";
import type { AppPreferenceRegistration } from "../../../../renderer/components/+preferences/app-preferences/app-preference-registration";
import React from "react";
export interface ExtensionSettingsProps {
registration: AppPreferenceRegistration;
}
export function ExtensionPreferenceBlock({ registration }: ExtensionSettingsProps) {
const {
title,
id,
components: { Hint, Input },
} = registration;
return (
<React.Fragment>
<section
id={id}
className="small"
>
<SubTitle title={title} />
<Input />
<div className="hint">
<Hint />
</div>
</section>
<hr className="small" />
</React.Fragment>
);
}