From ea4fd4b5e439f54adda500d20f15d8d7cd735c85 Mon Sep 17 00:00:00 2001 From: Aleka Cheung Date: Wed, 7 Feb 2024 12:46:37 -0500 Subject: [PATCH] more details nits --- src/components/Details.tsx | 16 +++++++++------- src/components/DetailsDialog.tsx | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/Details.tsx b/src/components/Details.tsx index 2a57f96..3a57293 100644 --- a/src/components/Details.tsx +++ b/src/components/Details.tsx @@ -133,6 +133,7 @@ const detailsLayoutVariants = { row: css` ${layoutMixins.row} align-self: stretch; + white-space: nowrap; `, rowColumns: css` @@ -159,12 +160,16 @@ const itemLayoutVariants: Record>> ${layoutMixins.spacedRow} gap: 0.5rem; + align-items: start; + padding: 0.5rem 0; min-height: var(--details-item-height); - > :last-child { - align-self: stretch; + > :first-child > abbr { + min-width: auto; + } + > :last-child { ${layoutMixins.row} ${layoutMixins.stickyRight} @@ -217,8 +222,6 @@ Styled.Details = styled.dl<{ --details-grid-numColumns: 2; ${({ layout }) => layout && detailsLayoutVariants[layout]} - - white-space: nowrap; `; Styled.Item = styled.div<{ @@ -226,14 +229,12 @@ Styled.Item = styled.div<{ justifyItems?: 'start' | 'end'; withOverflow: boolean; }>` - white-space: normal; - ${({ layout }) => layout && itemLayoutVariants[layout]} ${({ justifyItems }) => justifyItems === 'end' && css` - &:nth-child(even) { + > :nth-child(even) { justify-items: end; text-align: end; } @@ -245,6 +246,7 @@ Styled.Item = styled.div<{ { column: css` &:not(:hover) > :first-child { + white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis; } diff --git a/src/components/DetailsDialog.tsx b/src/components/DetailsDialog.tsx index 2a55833..87c186d 100644 --- a/src/components/DetailsDialog.tsx +++ b/src/components/DetailsDialog.tsx @@ -26,7 +26,7 @@ export const DetailsDialog = ({ slotIcon, title, items, slotFooter, setIsOpen }: placement={isTablet ? DialogPlacement.Default : DialogPlacement.Sidebar} > - + {slotFooter}