From f490cd258a01a859c3a6f3eb9953113555bfb3cb Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Mon, 20 Mar 2023 12:20:21 +0100 Subject: [PATCH] [website] Limit sponsors description to two rows --- docs/src/components/home/SponsorCard.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/src/components/home/SponsorCard.tsx b/docs/src/components/home/SponsorCard.tsx index df48ddf8751e26..be9338d3a5798d 100644 --- a/docs/src/components/home/SponsorCard.tsx +++ b/docs/src/components/home/SponsorCard.tsx @@ -21,6 +21,13 @@ export default function SponsorCard({ inView?: boolean; logoSize?: number | string; }) { + // Keep it under two rows maximum. + if (item.description.length > 50 && logoSize === 40) { + throw new Error( + `${item.name}'s description is too long (${item.description.length} characters). It must fit into two line, so under 50 characters.`, + ); + } + return (