Skip to content

Commit e1e9507

Browse files
Thomas Drevonbjoerge
Thomas Drevon
authored andcommitted
[form-builder] Pass BlockEditor description to DefaultFormField for rendering (#168)
1 parent 8807d2d commit e1e9507

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/@sanity/form-builder/src/inputs/BlockEditor-slate/BlockEditor.js

+2
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,11 @@ export default class BlockEditor extends React.Component {
280280

281281
const hasError = validation && validation.messages && validation.messages.length > 0
282282
const showLinkButton = this.customSpans.length > 0
283+
283284
return (
284285
<FormField
285286
label={type.title}
287+
description={type.description}
286288
labelFor={this._inputId}
287289
level={level}
288290
className={fullscreen ? styles.formFieldFullscreen : styles.formField}

packages/test-studio/schemas/blocks.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default {
1111
{
1212
name: 'defaults',
1313
title: 'Content',
14+
description: 'Profound description of what belongs here',
1415
type: 'array',
1516
of: [
1617
{type: 'image', title: 'Image'},

0 commit comments

Comments
 (0)