diff --git a/docs/plugins/customization.md b/docs/plugins/customization.md deleted file mode 100644 index 44ca5147ea..0000000000 --- a/docs/plugins/customization.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -id: customization -title: Customization (Experimental) -description: Documentation on adding a customization logic to the plugin ---- - -## Overview - -The Backstage core logic provides a possibility to make the component customizable in such a way that the application -developer can redefine the labels, icons, elements or even completely replace the component. It's up to each plugin -to decide what can be customized. - -## For a plugin developer - -When you are creating your plugin, you have a possibility to use a metadata field and define there all -customizable elements. For example - -```typescript jsx -const plugin = createPlugin({ - id: 'my-plugin', - __experimentalConfigure( - options?: CatalogInputPluginOptions, - ): CatalogPluginOptions { - const defaultOptions = { - createButtonTitle: 'Create', - }; - return { ...defaultOptions, ...options }; - }, -}); -``` - -And the rendering part of the exposed component can retrieve that metadata as: - -```typescript jsx -export type CatalogPluginOptions = { - createButtonTitle: string; -}; - -export type CatalogInputPluginOptions = { - createButtonTitle: string; -}; - -export const useCatalogPluginOptions = () => - usePluginOptions(); - -export function DefaultMyPluginWelcomePage() { - const { createButtonTitle } = useCatalogPluginOptions(); - - return ( -
- -
- ); -} -``` - -## For an application developer using the plugin - -The way to reconfigure the default values provided by the plugin you can do it via reconfigure method, defined on the -plugin. Example: - -```typescript jsx -import { myPlugin } from '@backstage/my-plugin'; - -myPlugin.__experimentalReconfigure({ - createButtonTitle: 'New', -}); -``` diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 0f4aef1373..bc394982ca 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -243,7 +243,6 @@ "plugins/integrating-plugin-into-software-catalog", "plugins/integrating-search-into-plugins", "plugins/composability", - "plugins/customization", "plugins/internationalization", "plugins/analytics", "plugins/feature-flags",