Skip to content

Commit

Permalink
fix(#6355): publish button dropdown items overflow menu (#6796)
Browse files Browse the repository at this point in the history
* fix: resolved text overflowing on publish button options

* fix: adjusted where min-width was changed for publish drop down items
  • Loading branch information
ghughes13 authored Jun 12, 2023
1 parent 5d33d09 commit 88382dc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/netlify-cms-core/src/components/Editor/EditorToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ const RefreshPreviewButton = styled.button`

const PreviewLink = RefreshPreviewButton.withComponent('a');

const PublishDropDownItem = styled(DropdownItem)`
min-width: initial;
`;

const StatusDropdownItem = styled(DropdownItem)`
${Icon} {
color: ${colors.infoText};
Expand Down Expand Up @@ -405,7 +409,7 @@ export class EditorToolbar extends React.Component {
return canPublish ? (
<ToolbarDropdown
dropdownTopOverlap="40px"
dropdownWidth="150px"
dropdownWidth="200px"
renderButton={() => (
<PublishButton>
{isPublishing
Expand All @@ -414,20 +418,20 @@ export class EditorToolbar extends React.Component {
</PublishButton>
)}
>
<DropdownItem
<PublishDropDownItem
label={t('editor.editorToolbar.publishNow')}
icon="arrow"
iconDirection="right"
onClick={onPublish}
/>
{canCreate ? (
<>
<DropdownItem
<PublishDropDownItem
label={t('editor.editorToolbar.publishAndCreateNew')}
icon="add"
onClick={onPublishAndNew}
/>
<DropdownItem
<PublishDropDownItem
label={t('editor.editorToolbar.publishAndDuplicate')}
icon="add"
onClick={onPublishAndDuplicate}
Expand Down

0 comments on commit 88382dc

Please sign in to comment.