From 63bb26dc224607dd719b747ff5926fa7c0845d12 Mon Sep 17 00:00:00 2001 From: Jesse Maltese Date: Tue, 30 Apr 2024 14:49:48 -0400 Subject: [PATCH] Some copy updates --- docs/reference/cms-dev-server.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/reference/cms-dev-server.md b/docs/reference/cms-dev-server.md index 7a01116..83b298c 100644 --- a/docs/reference/cms-dev-server.md +++ b/docs/reference/cms-dev-server.md @@ -89,7 +89,7 @@ If you are using Typescript in your CMS React project, you can make use of the ` ```tsx // components/modules/MyModule/fields.tsx -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + export const fields = ( ; + numberField: NumberFieldType; + defaultGroup: Override; + textFieldTwo: TextFieldType; + numberField: NumberFieldType; + }; + }>; +}>; +export default MyModuleFieldsType; +``` + + +Then, you can import and use the type in your component as follows: ```tsx // components/modules/MyModule/index.tsx + import { ModuleProps } from '@hubspot/cms-components'; import MyModule from './fields.types'; @@ -139,4 +164,4 @@ export const Component = ({ } ``` -The generated types file will be overwritten every time there is an update made to the fields file. If you would like to disable this overwriting, remove the `THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.` comment at the top of the file, which will disable overwriting of the types file. +Note that the generated types file will be overwritten every time there is an update made to the fields object. To disable this behaviour, remove the `THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.` comment at the top of the file.