diff --git a/plugins/examples/change-logo/src/index.tsx b/plugins/examples/change-logo/src/index.tsx index 28ba6544a3d..673c061838a 100644 --- a/plugins/examples/change-logo/src/index.tsx +++ b/plugins/examples/change-logo/src/index.tsx @@ -3,11 +3,20 @@ // import { registerAppLogo } from '@kinvolk/headlamp-plugin/lib'; // registerAppLogo(() =>
My Logo
); -import { AppLogoProps, registerAppLogo } from '@kinvolk/headlamp-plugin/lib'; +import { + AppLogoProps, + registerAppLogo, + registerPluginSettings, +} from '@kinvolk/headlamp-plugin/lib'; +import { ConfigStore } from '@kinvolk/headlamp-plugin/lib'; +import { PluginSettingsDetailProps } from '@kinvolk/headlamp-plugin/lib'; +import { NameValueTable } from '@kinvolk/headlamp-plugin/lib/CommonComponents'; import { SvgIcon } from '@mui/material'; +import Box from '@mui/material/Box'; +import TextField from '@mui/material/TextField'; +import { useEffect, useState } from 'react'; import LogoWithTextLight from './icon-large-light.svg'; import LogoLight from './icon-small-light.svg'; - /** * A simple logo using two different SVG files. * One for the small logo (used in mobile view), and a larger one used in desktop view. @@ -18,7 +27,12 @@ import LogoLight from './icon-small-light.svg'; function SimpleLogo(props: AppLogoProps) { const { logoType, className } = props; - return ( + const useConf = store.useConfig(); + const config = useConf(); + + return config?.url ? ( + + ) : (