From 922db29cd06397c82069d8f4db231753250264d1 Mon Sep 17 00:00:00 2001 From: PahaN47 Date: Fri, 29 Nov 2024 00:26:07 +0300 Subject: [PATCH] fix: requested changes --- README.md | 7 ++++--- src/containers/PageConstructor/PageConstructor.tsx | 6 +++--- .../__stories__/PageConstructor.stories.tsx | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fe24306e6..3da589850 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,12 @@ const Page: React.PropsWithChildren = ({content}) => ( ```typescript interface PageConstructorProps { - content: PageContent; //Blocks data in JSON format. + content: PageContent; // Blocks data in JSON format. shouldRenderBlock?: ShouldRenderBlock; // A function that is invoked when rendering each block and lets you set conditions for its display. - custom?: Custom; //Custom blocks (see `Customization`). - renderMenu?: () => React.ReactNode; //A function that renders the page menu with navigation (we plan to add rendering for the default menu version). + custom?: Custom; // Custom blocks (see `Customization`). + renderMenu?: () => React.ReactNode; // A function that renders the page menu with navigation (we plan to add rendering for the default menu version). navigation?: NavigationData; // Navigation data for using navigation component in JSON format + isBranded?: boolean; // If true, adds a footer that links to https://gravity-ui.com/. Try BrandFooter component for more customization. } interface PageConstructorProviderProps { diff --git a/src/containers/PageConstructor/PageConstructor.tsx b/src/containers/PageConstructor/PageConstructor.tsx index b9d4e1377..c407e75e9 100644 --- a/src/containers/PageConstructor/PageConstructor.tsx +++ b/src/containers/PageConstructor/PageConstructor.tsx @@ -51,7 +51,7 @@ export interface PageConstructorProps { custom?: CustomConfig; renderMenu?: () => React.ReactNode; navigation?: NavigationData; - branded?: boolean; + isBranded?: boolean; microdata?: { contentUpdatedDate?: string; }; @@ -64,7 +64,7 @@ export const Constructor = (props: PageConstructorProps) => { shouldRenderBlock, navigation, custom, - branded, + isBranded, microdata, } = props; @@ -124,7 +124,7 @@ export const Constructor = (props: PageConstructorProps) => { )} - {branded && } + {isBranded && } diff --git a/src/containers/PageConstructor/__stories__/PageConstructor.stories.tsx b/src/containers/PageConstructor/__stories__/PageConstructor.stories.tsx index 590b66aff..c0d7ea7cb 100644 --- a/src/containers/PageConstructor/__stories__/PageConstructor.stories.tsx +++ b/src/containers/PageConstructor/__stories__/PageConstructor.stories.tsx @@ -37,5 +37,5 @@ WithFullWidthBackgroundMedia.args = { } as PageConstructorProps; Branded.args = { ...data.default, - branded: true, + isBranded: true, };