Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vital-layout): Move Disclaimer #2038

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

import React, { FC } from 'react';
import { Div, designable } from '@bodiless/fclasses';
import { Div, designable, Fragment } from '@bodiless/fclasses';
import { RichTextClean } from '@bodiless/vital-editors';
import { asVitalTokenSpec } from '@bodiless/vital-elements';
import { withoutHydration } from '@bodiless/hydration';
Expand All @@ -23,6 +23,7 @@ import type { CopyrightRowComponents, CopyrightRowProps } from './types';
const copyrightRowComponents: CopyrightRowComponents = {
Wrapper: Div,
CopyrightWrapper: Div,
DisclaimerWrapper: Fragment,
Disclaimer: RichTextClean,
Copyright: RichTextClean,
SocialLinksWrapper: Div,
Expand All @@ -32,12 +33,14 @@ const copyrightRowComponents: CopyrightRowComponents = {
const CopyrightRowCleanBase: FC<CopyrightRowProps> = ({ components: C, ...rest }) => (
<C.Wrapper {...rest}>
<C.CopyrightWrapper>
<C.Disclaimer />
<C.Copyright />
</C.CopyrightWrapper>
<C.SocialLinksWrapper>
<C.SocialLinks />
</C.SocialLinksWrapper>
<C.DisclaimerWrapper>
<C.Disclaimer />
</C.DisclaimerWrapper>
</C.Wrapper>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ interface CopyrightRowComponents extends DesignableComponents {
* Used for the social links
*/
SocialLinks: ComponentOrTag<any>,
/**
* Wrapper for the Disclaimer
*/
DisclaimerWrapper: ComponentOrTag<any>,
/**
* Used for the Disclaimer
*/
Disclaimer: ComponentOrTag<any>,
}

type CopyrightRowProps = DesignableComponentsProps<CopyrightRowComponents>;
Expand Down