fix: Confusing breadcrumb collapsing

This commit is contained in:
Tom Moor
2021-01-14 19:36:31 -08:00
parent 03cb6d66e7
commit b4d307b3b4

View File

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