fix: Confusing breadcrumb collapsing

This commit is contained in:
Tom Moor 2021-01-14 19:36:31 -08:00
parent 03cb6d66e7
commit b4d307b3b4
1 changed files with 12 additions and 8 deletions

View File

@ -31,11 +31,11 @@ function Icon({ document }) {
if (document.isDeleted) {
return (
<>
<CollectionName to="/trash">
<CategoryName to="/trash">
<TrashIcon color="currentColor" />
&nbsp;
<span>{t("Trash")}</span>
</CollectionName>
</CategoryName>
<Slash />
</>
);
@ -43,11 +43,11 @@ function Icon({ document }) {
if (document.isArchived) {
return (
<>
<CollectionName to="/archive">
<CategoryName to="/archive">
<ArchiveIcon color="currentColor" />
&nbsp;
<span>{t("Archive")}</span>
</CollectionName>
</CategoryName>
<Slash />
</>
);
@ -55,11 +55,11 @@ function Icon({ document }) {
if (document.isDraft) {
return (
<>
<CollectionName to="/drafts">
<CategoryName to="/drafts">
<EditIcon color="currentColor" />
&nbsp;
<span>{t("Drafts")}</span>
</CollectionName>
</CategoryName>
<Slash />
</>
);
@ -67,11 +67,11 @@ function Icon({ document }) {
if (document.isTemplate) {
return (
<>
<CollectionName to="/templates">
<CategoryName to="/templates">
<ShapesIcon color="currentColor" />
&nbsp;
<span>{t("Templates")}</span>
</CollectionName>
</CategoryName>
<Slash />
</>
);
@ -197,4 +197,8 @@ const CollectionName = styled(Link)`
}
`;
const CategoryName = styled(CollectionName)`
flex-shrink: 0;
`;
export default observer(Breadcrumb);