Код: Выделить всё
export default function Hero({
height,
children,
}: {
height: string;
children: ReactNode;
}) {
return (
className={`flex flex-col h-[${height}] py-1 bg-red-400 text-white items-center justify-center`}
>
{children}
);
}
Код: Выделить всё
export default function Page() {
return (
);
}

Я пытался сделать высоту статичной, чтобы проверить, не случилось ли что-то не так с самим компонентом героя, но все сработало нормально:
Код: Выделить всё
export default function Hero({
height,
children,
}: {
height: string;
children: ReactNode;
}) {
return (
className={`flex flex-col h-[80px] py-1 bg-red-400 text-white items-center justify-center`}
>
{children}
);
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... ts-next-js
Мобильная версия