fix(custom-widgets): address review feedback

This commit is contained in:
Thomas Camlong committed 2026-07-12 15:08:59 +02:00
1 parent c43836e85a
commit c5703e7e53
9 files changed
+93 -63

No files matched your search

+5 -1
View File
@@ -291,7 +291,11 @@ const componentSafeProps: Readonly<Record<string, readonly string[]>> = {
function documentationUrl(packageName: CustomJsxComponentPackage, name: string): string {
if (packageName === "@homarr/widgets") return "https://homarr.dev/docs/management/custom-widgets/";
const section = packageName === "@mantine/core" ? "core" : packageName === "@mantine/charts" ? "charts" : "dates";
return `https://mantine.dev/${section}/${name.split(".")[0]?.toLowerCase() ?? ""}/`;
const slug = (name.split(".")[0] ?? "")
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2")
.toLowerCase();
return `https://mantine.dev/${section}/${slug}/`;
}
const describe = (