diff --git a/packages/sanity/src/structure/i18n/resources.ts b/packages/sanity/src/structure/i18n/resources.ts
index e197a457a94..1f1f3f8ca89 100644
--- a/packages/sanity/src/structure/i18n/resources.ts
+++ b/packages/sanity/src/structure/i18n/resources.ts
@@ -104,16 +104,16 @@ const structureLocaleStrings = defineLocalesResources('structure', {
'The type {{schemaType}} has liveEdit enabled, but a draft version of this document exists. Publish or discard the draft in order to continue live editing it.',
/** The text for the permission check banner if the user only has one role, and it does not allow updating this document */
'banners.permission-check-banner.missing-permission_create_one':
- 'Your role does not have permissions to publish this document.',
+ "You don't have permission to publish this document.",
/** The text for the permission check banner if the user only has multiple roles, but they do not allow updating this document */
'banners.permission-check-banner.missing-permission_create_other':
- 'Your roles do not have permissions to publish this document.',
+ "You don't have permission to publish this document.",
/** The text for the permission check banner if the user only has one role, and it does not allow updating this document */
'banners.permission-check-banner.missing-permission_update_one':
- 'Your role does not have permissions to edit this document.',
+ "You don't have permission to edit this document.",
/** The text for the permission check banner if the user only has multiple roles, but they do not allow updating this document */
'banners.permission-check-banner.missing-permission_update_other':
- 'Your roles do not have permissions to edit this document.',
+ "You don't have permission to edit this document.",
/** The text for the request permission button that appears for viewer roles */
'banners.permission-check-banner.request-permission-button.text': 'Ask to edit',
/** The text for the reload button */
diff --git a/packages/sanity/src/structure/panes/document/documentPanel/banners/Banner.tsx b/packages/sanity/src/structure/panes/document/documentPanel/banners/Banner.tsx
index 11f66145c90..1f89b7bff91 100644
--- a/packages/sanity/src/structure/panes/document/documentPanel/banners/Banner.tsx
+++ b/packages/sanity/src/structure/panes/document/documentPanel/banners/Banner.tsx
@@ -1,8 +1,7 @@
-import {type ButtonTone, Card, type CardTone, Flex, Text} from '@sanity/ui'
+import {type ButtonMode, type ButtonTone, Card, type CardTone, Flex, Text} from '@sanity/ui'
import {type ComponentType, type ElementType, type JSX, type ReactNode} from 'react'
import {Button} from '../../../../../ui-components'
-import {SpacerButton} from '../../../../components/spacerButton'
interface BannerProps {
action?: {
@@ -11,34 +10,34 @@ interface BannerProps {
onClick?: () => void
text: string
tone?: ButtonTone
+ mode?: ButtonMode
}
content: ReactNode
icon?: ComponentType
tone?: CardTone
+ center?: boolean
}
export function Banner(props: BannerProps) {
- const {action, content, icon: Icon, tone = 'transparent', ...rest} = props
+ const {action, center, content, icon: Icon, tone = 'transparent', ...rest} = props
return (
-
+
{Icon && (
)}
-
+
{content}
-
-
{action && (
}
+ center
action={
isOnlyViewer
? {
onClick: () => setShowDialog(true),
text: t('banners.permission-check-banner.request-permission-button.text'),
tone: 'primary',
+ // mode: 'bleed',
}
: undefined
}