diff --git a/packages/root-cms/core/schema.ts b/packages/root-cms/core/schema.ts index c2b8c983..3508b6e0 100644 --- a/packages/root-cms/core/schema.ts +++ b/packages/root-cms/core/schema.ts @@ -9,6 +9,8 @@ export interface CommonFieldProps { default?: any; hidden?: boolean; deprecated?: boolean; + /** Hides the field label in the CMS UI. */ + hideLabel?: boolean; } export type StringField = CommonFieldProps & { diff --git a/packages/root-cms/ui/components/DocEditor/DocEditor.tsx b/packages/root-cms/ui/components/DocEditor/DocEditor.tsx index 05404000..4f31ade2 100644 --- a/packages/root-cms/ui/components/DocEditor/DocEditor.tsx +++ b/packages/root-cms/ui/components/DocEditor/DocEditor.tsx @@ -157,7 +157,7 @@ DocEditor.Field = (props: FieldProps) => { data-level={level} data-key={props.deepKey} > - {!props.hideHeader && ( + {!props.hideHeader && !field.hideLabel && (
{field.deprecated ? (