diff --git a/.changeset/great-countries-yawn.md b/.changeset/great-countries-yawn.md new file mode 100644 index 00000000000..48bfb5aaccd --- /dev/null +++ b/.changeset/great-countries-yawn.md @@ -0,0 +1,5 @@ +--- +'@primer/components': patch +--- + +Fix the Timeline.Item layout diff --git a/src/Timeline.tsx b/src/Timeline.tsx index bb0fe94726c..7c48662896e 100644 --- a/src/Timeline.tsx +++ b/src/Timeline.tsx @@ -29,6 +29,7 @@ type StyledTimelineItemProps = {condensed?: boolean} const TimelineItem = styled(Box).attrs(props => ({ className: classnames('Timeline-Item', props.className) }))` + display: flex; position: relative; padding: ${get('space.3')} 0; margin-left: ${get('space.3')}; diff --git a/src/__tests__/__snapshots__/Timeline.tsx.snap b/src/__tests__/__snapshots__/Timeline.tsx.snap index 18910d27bb2..2cece715237 100644 --- a/src/__tests__/__snapshots__/Timeline.tsx.snap +++ b/src/__tests__/__snapshots__/Timeline.tsx.snap @@ -89,6 +89,10 @@ exports[`Timeline.Badge renders consistently 1`] = ` exports[`Timeline.Item renders consistently 1`] = ` .c0 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; position: relative; padding: 16px 0; margin-left: 16px; @@ -112,6 +116,10 @@ exports[`Timeline.Item renders consistently 1`] = ` exports[`Timeline.Item renders with condensed prop 1`] = ` .c0 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; position: relative; padding: 16px 0; margin-left: 16px;