Skip to content

Commit

Permalink
feat: add hideLabel to schema fields (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenle authored May 2, 2024
1 parent 8d1bed8 commit 28dfa73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/root-cms/core/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand Down
2 changes: 1 addition & 1 deletion packages/root-cms/ui/components/DocEditor/DocEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ DocEditor.Field = (props: FieldProps) => {
data-level={level}
data-key={props.deepKey}
>
{!props.hideHeader && (
{!props.hideHeader && !field.hideLabel && (
<div className="DocEditor__field__header">
{field.deprecated ? (
<div className="DocEditor__field__name">
Expand Down

0 comments on commit 28dfa73

Please sign in to comment.