Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 6382ebe

Browse files
committed
fix: new entry button text overflow
1 parent be142f8 commit 6382ebe

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

packages/core/src/components/collections/Collection.classes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const collectionClasses = generateClassNames('Collection', [
1212
'header-icon',
1313
'header-label',
1414
'new-entry-button',
15+
'new-entry-button-text',
1516
]);
1617

1718
export default collectionClasses;

packages/core/src/components/collections/Collection.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,10 @@
8383

8484
.CMS_Collection_new-entry-button {
8585
@apply hidden
86-
md:flex;
86+
md:flex
87+
min-w-0;
88+
}
89+
90+
.CMS_Collection_new-entry-button-text {
91+
@apply truncate;
8792
}

packages/core/src/components/collections/CollectionHeader.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ const CollectionHeader: FC<CollectionHeaderProps> = ({ collection }) => {
7676
</h2>
7777
{newEntryUrl ? (
7878
<Button to={newEntryUrl} className={collectionClasses['new-entry-button']}>
79-
{t('collection.collectionTop.newButton', {
80-
collectionLabel: collectionLabelSingular ?? pluralLabel,
81-
})}
79+
<div className={collectionClasses['new-entry-button-text']}>
80+
{t('collection.collectionTop.newButton', {
81+
collectionLabel: collectionLabelSingular ?? pluralLabel,
82+
})}
83+
</div>
8284
</Button>
8385
) : null}
8486
</div>

0 commit comments

Comments
 (0)