From 3b269181b68625f283269cdca9200da3a3937b3b Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Fri, 7 May 2021 16:01:34 +0200 Subject: [PATCH] Update README with tsx code block Signed-off-by: Marcus Eide --- plugins/shortcuts/README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/shortcuts/README.md b/plugins/shortcuts/README.md index 36bd9e62f8..162afe009b 100644 --- a/plugins/shortcuts/README.md +++ b/plugins/shortcuts/README.md @@ -19,16 +19,18 @@ export { shortcutsPlugin } from '@backstage/plugin-shortcuts'; Add the `` component within your ``: -```ts +```tsx import { Sidebar, SidebarDivider, SidebarSpace } from '@backstage/core'; import { Shortcuts } from '@backstage/plugin-shortcuts'; - - {/* ... */} - - - -; +export const SidebarComponent = () => ( + + {/* ... */} + + + + +); ``` The plugin exports a `shortcutApiRef` but the plugin includes a default implementation of the `ShortcutApi` that uses `localStorage` to store each user's shortcuts.