Compare commits

...
Author SHA1 Message Date
Aleka Cheung ea4fd4b5e4 more details nits 2024-02-07 15:18:20 -05:00
Aleka Cheung aad5539f18 wrap details item 2024-02-07 15:18:15 -05:00
2 changed files with 10 additions and 6 deletions
+9 -5
View File
@@ -133,6 +133,7 @@ const detailsLayoutVariants = {
row: css` row: css`
${layoutMixins.row} ${layoutMixins.row}
align-self: stretch; align-self: stretch;
white-space: nowrap;
`, `,
rowColumns: css` rowColumns: css`
@@ -159,12 +160,16 @@ const itemLayoutVariants: Record<string, FlattenInterpolation<ThemeProps<any>>>
${layoutMixins.spacedRow} ${layoutMixins.spacedRow}
gap: 0.5rem; gap: 0.5rem;
align-items: start;
padding: 0.5rem 0;
min-height: var(--details-item-height); min-height: var(--details-item-height);
> :last-child { > :first-child > abbr {
align-self: stretch; min-width: auto;
}
> :last-child {
${layoutMixins.row} ${layoutMixins.row}
${layoutMixins.stickyRight} ${layoutMixins.stickyRight}
@@ -217,8 +222,6 @@ Styled.Details = styled.dl<{
--details-grid-numColumns: 2; --details-grid-numColumns: 2;
${({ layout }) => layout && detailsLayoutVariants[layout]} ${({ layout }) => layout && detailsLayoutVariants[layout]}
white-space: nowrap;
`; `;
Styled.Item = styled.div<{ Styled.Item = styled.div<{
@@ -231,7 +234,7 @@ Styled.Item = styled.div<{
${({ justifyItems }) => ${({ justifyItems }) =>
justifyItems === 'end' && justifyItems === 'end' &&
css` css`
&:nth-child(even) { > :nth-child(even) {
justify-items: end; justify-items: end;
text-align: end; text-align: end;
} }
@@ -243,6 +246,7 @@ Styled.Item = styled.div<{
{ {
column: css` column: css`
&:not(:hover) > :first-child { &:not(:hover) > :first-child {
white-space: nowrap;
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
+1 -1
View File
@@ -26,7 +26,7 @@ export const DetailsDialog = ({ slotIcon, title, items, slotFooter, setIsOpen }:
placement={isTablet ? DialogPlacement.Default : DialogPlacement.Sidebar} placement={isTablet ? DialogPlacement.Default : DialogPlacement.Sidebar}
> >
<Styled.Content> <Styled.Content>
<Styled.Details withSeparators items={items} /> <Styled.Details withSeparators justifyItems="end" items={items} />
<Styled.Footer>{slotFooter}</Styled.Footer> <Styled.Footer>{slotFooter}</Styled.Footer>
</Styled.Content> </Styled.Content>