У меня есть сетка из 6 столбцов, в которых 5 столбцов занимают " GridItem", и у меня есть дополнительный оставшийся столбец, в который я собираюсь поместить еще один элемент div с информацией (окрашен красным).
У меня есть svg, который, похоже, не заполняет остаток. пространство справа. Однако только первая строка смещена по вертикали; Я не уверен, почему здесь есть пробел. Ниже приведен снимок экрана моей проблемы и мой код .tsx.
Код: Выделить всё
interface GridItemProps {
children: React.ReactNode;
spacingClass: string;
visualClass: string;
}
interface ExperienceItemProps {
svg: React.ReactNode;
title: string;
location: string;
date: string;
content: string;
}
function GridItem({ children, spacingClass, visualClass }: GridItemProps) {
return (
{children}
);
}
function ExperienceItem({
svg,
title,
location,
date,
content,
}: ExperienceItemProps) {
return (
{svg}
{title}
{location}
{date}
{content}
);
}
function Experience() {
return (
// Header
Experience
View LinkedIn
{/* grid of experience items */}
}
title="Job Title"
location="Company - Location"
date="January 2020 - January 2021"
content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum."
>
Hi
Hi
);
}
export default Experience;
Я попытался перекрасить все свои элементы div, чтобы увидеть, что происходит. Я пробовал работать с полями/отступами всех моих элементов div. Я также попытался поработать со стилем моего SVG. Пока ничего не помогло.
Любая помощь приветствуется!
Подробнее здесь: https://stackoverflow.com/questions/786 ... hen-placed