Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help-beta: Add KeyboardTip component.
Shubham Padia9d9b0c01fcfc
diff --git a/help-beta/src/components/KeyboardTip.astro b/help-beta/src/components/KeyboardTip.astronew file mode 100644index 00000000000..7c28c02a2d4--- /dev/null+++ b/help-beta/src/components/KeyboardTip.astro@@ -0,0 +1,25 @@+---+import ZulipIconsKeyboard from "~icons/zulip-icon/keyboard"++let { title } = Astro.props;+if (!title) {+ title = "Keyboard Shortcut";+}+---++<!--+We have an open PR to the upstream starlight repository to add support+for custom icons in the Aside starlight component. The PR is stalled+due to dependency on some of the custom icons work being done on+starlight. We should replace the code below with the Aside starlight+component along with a custom icon (keyboard in out case).+Link: https://github.com/withastro/starlight/pull/2261+-->+<aside aria-label={title} class={`starlight-aside starlight-aside--tip`}>+ <p class="starlight-aside__title" aria-hidden="true">+ <ZulipIconsKeyboard class="starlight-aside__icon" />{title}+ </p>+ <div class="starlight-aside__content">+ <slot />+ </div>+</aside>diff --git a/help-beta/tsconfig.json b/help-beta/tsconfig.jsonindex 633f999d2af..4cb11df41fe 100644--- a/help-beta/tsconfig.json+++ b/help-beta/tsconfig.json@@ -26,5 +26,7 @@/* Projects */"composite": true,++ "types": ["unplugin-icons/types/astro"],},}