Skip to content

Commit a17d84e

Browse files
fix(ui): reduces pill sizing in autosave cells (#12606)
1 parent ca6f849 commit a17d84e

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@layer payload-default {
2+
.autosave-cell {
3+
&__items {
4+
display: flex;
5+
align-items: center;
6+
gap: calc(var(--base) * 0.5);
7+
}
8+
}
9+
}

packages/next/src/views/Versions/cells/AutosaveCell/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
'use client'
22
import { Pill, useConfig, useTranslation } from '@payloadcms/ui'
3-
import React, { Fragment } from 'react'
3+
import React from 'react'
4+
5+
import './index.scss'
6+
7+
const baseClass = 'autosave-cell'
48

59
type AutosaveCellProps = {
610
latestDraftVersion?: string
@@ -24,7 +28,6 @@ export const renderPill = (data, latestVersion, currentLabel, previousLabel, pil
2428
) : (
2529
<Pill size="small">{previousLabel}</Pill>
2630
)}
27-
&nbsp;&nbsp;
2831
</React.Fragment>
2932
)
3033
}
@@ -73,10 +76,10 @@ export const AutosaveCell: React.FC<AutosaveCellProps> = ({
7376
}
7477

7578
return (
76-
<Fragment>
79+
<div className={`${baseClass}__items`}>
7780
{rowData?.autosave && <Pill>{t('version:autosave')}</Pill>}
7881
{status && renderPill(rowData, latestVersion, currentLabel, previousLabel, pillStyle)}
7982
{publishedLocalePill}
80-
</Fragment>
83+
</div>
8184
)
8285
}

0 commit comments

Comments
 (0)