fix: Alignment of skeleton on document history sidebar

This commit is contained in:
Tom Moor
2022-09-08 12:02:33 +01:00
parent fa75d5585f
commit e0c74483d1
5 changed files with 12 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ function DocumentHistory() {
documentId: document.id,
}}
document={document}
empty={<Empty>{t("Oh weird, there's nothing here")}</Empty>}
empty={<Empty>{t("No history yet")}</Empty>}
/>
</Scrollable>
</Position>

View File

@@ -171,7 +171,7 @@ const Subtitle = styled.span`
const ItemStyle = css`
border: 0;
position: relative;
margin: 8px;
margin: 8px 0;
padding: 8px;
border-radius: 8px;

View File

@@ -13,6 +13,7 @@ type Props = {
heading?: React.ReactNode;
empty?: React.ReactNode;
};
const PaginatedEventList = React.memo<Props>(function PaginatedEventList({
empty,
heading,
@@ -23,7 +24,7 @@ const PaginatedEventList = React.memo<Props>(function PaginatedEventList({
...rest
}: Props) {
return (
<PaginatedList
<StyledPaginatedList
items={events}
empty={empty}
heading={heading}
@@ -44,9 +45,13 @@ const PaginatedEventList = React.memo<Props>(function PaginatedEventList({
);
});
const StyledPaginatedList = styled(PaginatedList)`
padding: 0 8px;
`;
const Heading = styled("h3")`
font-size: 14px;
padding: 0 12px;
padding: 0 4px;
`;
export default PaginatedEventList;

View File

@@ -29,6 +29,7 @@ type Props<T> = WithTranslation &
empty?: React.ReactNode;
loading?: React.ReactElement;
items?: T[];
className?: string;
renderItem: (
item: T,
index: number,
@@ -184,6 +185,7 @@ class PaginatedList<T extends PaginatedItem> extends React.Component<Props<T>> {
<ArrowKeyNavigation
aria-label={this.props["aria-label"]}
onEscape={onEscape}
className={this.props.className}
>
{(composite: CompositeStateReturn) => {
let previousHeading = "";

View File

@@ -96,7 +96,7 @@
"Deleted Collection": "Deleted Collection",
"Unpin": "Unpin",
"History": "History",
"Oh weird, there's nothing here": "Oh weird, there's nothing here",
"No history yet": "No history yet",
"New": "New",
"Only visible to you": "Only visible to you",
"Draft": "Draft",