From 23c3fed826ce556fc3f7dfcde51540d9ec2e8e75 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Wed, 28 Aug 2024 10:47:17 +0200 Subject: [PATCH] feat: :sparkles: add ContactEmbedNotice component --- src/app/(payload)/admin/importMap.js | 4 +++- src/globals/Contact.tsx | 9 +++++++++ src/globals/ContactEmbedNotice.tsx | 6 ++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/app/(payload)/admin/importMap.js b/src/app/(payload)/admin/importMap.js index b9a1c4d..b964d9a 100644 --- a/src/app/(payload)/admin/importMap.js +++ b/src/app/(payload)/admin/importMap.js @@ -21,6 +21,7 @@ import { StrikethroughFeatureClient as StrikethroughFeatureClient_19 } from '@pa import { UnderlineFeatureClient as UnderlineFeatureClient_20 } from '@payloadcms/richtext-lexical/client' import { BoldFeatureClient as BoldFeatureClient_21 } from '@payloadcms/richtext-lexical/client' import { ItalicFeatureClient as ItalicFeatureClient_22 } from '@payloadcms/richtext-lexical/client' +import { ContactEmbedNotice as ContactEmbedNotice_23 } from 'src/globals/ContactEmbedNotice.tsx' export const importMap = { "@payloadcms/richtext-lexical/client#RichTextCell": RichTextCell_0, @@ -45,5 +46,6 @@ export const importMap = { "@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_19, "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_20, "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_21, - "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_22 + "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_22, + "/globals/ContactEmbedNotice.tsx#ContactEmbedNotice": ContactEmbedNotice_23 } diff --git a/src/globals/Contact.tsx b/src/globals/Contact.tsx index 395ce04..6cb1c80 100644 --- a/src/globals/Contact.tsx +++ b/src/globals/Contact.tsx @@ -52,6 +52,15 @@ export const Contact: GlobalConfig = { name: "embeddedMaps", type: "code", }, + { + name: "embeddedMapsNotice", + type: "ui", + admin: { + components: { + Field: "/globals/ContactEmbedNotice.tsx#ContactEmbedNotice", + }, + }, + }, ], }, { diff --git a/src/globals/ContactEmbedNotice.tsx b/src/globals/ContactEmbedNotice.tsx index 46e9e66..b611072 100644 --- a/src/globals/ContactEmbedNotice.tsx +++ b/src/globals/ContactEmbedNotice.tsx @@ -1,6 +1,8 @@ +import { Text } from "@/components/ui/text"; + export const ContactEmbedNotice = () => ( -

+ Use a generator like maps.ie to create a Google Maps embed. -

+ );