From efa3ceff40898c1b12857d53544e6bd925982bd3 Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 12 Jan 2018 17:40:28 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Update=20Docs=20=E2=80=9Ccustom-widgets?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/site/content/docs/custom-widgets.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/site/content/docs/custom-widgets.md b/website/site/content/docs/custom-widgets.md index 279112ed..e3ca7072 100644 --- a/website/site/content/docs/custom-widgets.md +++ b/website/site/content/docs/custom-widgets.md @@ -19,13 +19,13 @@ However, although possible, it may be cumbersome or even impractical to add a Re Register a custom widget. -```js -// Using global window object -CMS.registerWidget(name, control, [preview]) - -// Using npm module import -import CMS from 'netlify-cms' -CMS.registerWidget(name, control, [preview]) +```js +// Using global window object +CMS.registerWidget(name, control, [preview]); + +// Using npm module import +import CMS from 'netlify-cms'; +CMS.registerWidget(name, control, [preview]); ``` **Params:** @@ -33,7 +33,7 @@ CMS.registerWidget(name, control, [preview]) | Param | Type | Description | | ----------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | string | Widget name, allows this widget to be used via the field `widget` property in config | -| `control` | React.Component | string | | +| `control` | React.Component \| string | | | [`preview`] | React.Component, optional | Renders the widget preview, receives the following props: | * **field:** The field type that this widget will be used for. From eee17ced4b975df6d8378719e5f99eec01389f47 Mon Sep 17 00:00:00 2001 From: Jessica Parsons Date: Wed, 17 Jan 2018 00:54:07 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Update=20Docs=20=E2=80=9Ccustom-widgets?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/site/content/docs/custom-widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/site/content/docs/custom-widgets.md b/website/site/content/docs/custom-widgets.md index e3ca7072..cdd18a02 100644 --- a/website/site/content/docs/custom-widgets.md +++ b/website/site/content/docs/custom-widgets.md @@ -33,7 +33,7 @@ CMS.registerWidget(name, control, [preview]); | Param | Type | Description | | ----------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | string | Widget name, allows this widget to be used via the field `widget` property in config | -| `control` | React.Component \| string | | +| `control` | React.Component | | | [`preview`] | React.Component, optional | Renders the widget preview, receives the following props: | * **field:** The field type that this widget will be used for.