Files
outline/app/scenes/Collection/components/Empty.tsx
T
Tom Moor e571208871 fix: Spelling, grammar, punctuation, and translation string errors (#14017)
* fix: Spelling, grammar, punctuation, and translation string errors

* fix: Remove duplicate period and comma splice from review feedback
2026-10-11 09:07:07 -04:00

46 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { observer } from "mobx-react";
import { Trans } from "react-i18next";
import styled from "styled-components";
import type Collection from "~/models/Collection";
import Fade from "~/components/Fade";
import Flex from "~/components/Flex";
import Text from "~/components/Text";
type Props = {
/** The collection to display the empty state for. */
collection: Collection;
};
function EmptyCollection({ collection }: Props) {
const collectionName = collection ? collection.name : "";
return (
<Fade>
<Centered column>
<Text as="p" type="secondary">
<Trans
defaults="<em>{{ collectionName }}</em> doesn’t contain any documents yet."
values={{
collectionName,
}}
components={{
em: <strong />,
}}
/>
</Text>
</Centered>
</Fade>
);
}
const Centered = styled(Flex)`
text-align: center;
align-items: center;
justify-content: center;
margin: 0 auto;
max-width: 380px;
height: 50vh;
`;
export default observer(EmptyCollection);