Skip to content

Commit

Permalink
[website] Limit sponsors description to two rows
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 20, 2023
1 parent 7191521 commit f490cd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/src/components/home/SponsorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Paper
component={Link}
Expand Down

0 comments on commit f490cd2

Please sign in to comment.