feat(rss-widget): add hide description option (#4000)

Co-authored-by: HeapReaper <kelivn@heapreaper.nl>
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
HeapReaper
2025-09-04 22:57:24 +02:00
committed by GitHub
parent b34440470f
commit b2eb2c32f6
4 changed files with 8 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ export default function RssFeed({ options }: WidgetComponentProps<"rssFeed">) {
<Text dir={languageDir} fz="sm" lh="sm" lineClamp={2}>
{feedEntry.title}
</Text>
{feedEntry.description && (
{!options.hideDescription && feedEntry.description && (
<Text
className={feedEntry.description}
dir={languageDir}

View File

@@ -29,6 +29,9 @@ export const { definition, componentLoader } = createWidgetDefinition("rssFeed",
defaultValue: 100,
validate: z.number().min(1).max(9999),
}),
hideDescription: factory.switch({
defaultValue: false,
}),
}));
},
}).withDynamicImport(() => import("./component"));