Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

help-beta: Set class explicitly instead of using default class.

Shubham Padia9f6c00a52cd8
diff --git a/help-beta/astro.config.mjs b/help-beta/astro.config.mjs
index 8bee60e6ab8..143ef96be90 100644
--- a/help-beta/astro.config.mjs
+++ b/help-beta/astro.config.mjs
@@ -12,10 +12,6 @@ export default defineConfig({
// eslint-disable-next-line new-cap
Icons({
compiler: "astro",
- // We need to override some default starlight behaviour to make
- // icons look nice, see the css for this class to see the reasoning
- // for each individual override of the default css.
- defaultClass: "zulip-unplugin-icon",
customCollections: {
// unplugin-icons has a FileSystemIconLoader which is more
// versatile. But it only supports one directory path for
@@ -33,6 +29,14 @@ export default defineConfig({
throw new Error("Zulip icon not found.");
},
},
+ iconCustomizer(collection, _icon, props) {
+ if (collection === "zulip-icon") {
+ // We need to override some default starlight behaviour to make
+ // icons look nice, see the css for this class to see the reasoning
+ // for each individual override of the default css.
+ props.class = "zulip-unplugin-icon";
+ }
+ },
}),
],
},