Skip to content

Commit

Permalink
feature(bc-footer): Rename GlobalFooter To Footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Zeni committed Mar 11, 2022
1 parent 33e8f47 commit b13f2be
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
* limitations under the License.
*/

export { __cxstarter__GlobalFooter } from './tokens';
export { __cxstarter__Footer } from './tokens';
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
* limitations under the License.
*/

import { cxGlobalFooter, asGlobalFooterToken } from '@bodiless/cx-layout';
import { cxFooter, asFooterToken } from '@bodiless/cx-layout';

const Default = asGlobalFooterToken({
...cxGlobalFooter.Default,
const Default = asFooterToken({
...cxFooter.Default,
Components: {
...cxGlobalFooter.Default.Components,
...cxFooter.Default.Components,
},
});

export default {
...cxGlobalFooter,
...cxFooter,
Default,
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* limitations under the License.
*/

import __cxstarter__GlobalFooter from './__cxstarter__GlobalFooter';
import __cxstarter__Footer from './__cxstarter__Footer';

export { __cxstarter__GlobalFooter };
export { __cxstarter__Footer };
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
*/

import { cxLayout, asLayoutToken } from '@bodiless/cx-layout';
import { __cxstarter__GlobalFooter } from '../../GlobalFooter';
import { __cxstarter__Footer } from '../../Footer';
import { __cxstarter__Header } from '../../Header';

const Default = asLayoutToken({
...cxLayout.Default,
Components: {
...cxLayout.Default.Components,
SiteHeader: __cxstarter__Header.Default,
SiteFooter: __cxstarter__GlobalFooter.Default,
SiteFooter: __cxstarter__Footer.Default,
},
Compose: {
...cxLayout.Default.Compose,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { asCxTokenSpec } from '@bodiless/cx-elements';
import { FooterMenuClean } from '../FooterMenu';
import { RewardsClean } from './Rewards';
import { SocialLinksClean } from './SocialLinks';
import type { GlobalFooterComponents, GlobalFooterProps } from './types';
import type { FooterComponents, FooterProps } from './types';

const globalFooterComponents: GlobalFooterComponents = {
const footerComponents: FooterComponents = {
Wrapper: Div,
Container: Div,
SectionTop: Div,
Expand All @@ -31,7 +31,7 @@ const globalFooterComponents: GlobalFooterComponents = {
SocialLinks: SocialLinksClean,
};

const GlobalFooterCleanBase: FC<GlobalFooterProps> = ({ components: C }) => (
const FooterCleanBase: FC<FooterProps> = ({ components: C }) => (
<C.Wrapper>
<C.Container>
<C.SectionTop>
Expand All @@ -46,11 +46,11 @@ const GlobalFooterCleanBase: FC<GlobalFooterProps> = ({ components: C }) => (
</C.Wrapper>
);

const GlobalFooterClean = designable(globalFooterComponents, 'GlobalFooter')(GlobalFooterCleanBase);
const FooterClean = designable(footerComponents, 'Footer')(FooterCleanBase);

const asGlobalFooterToken = asCxTokenSpec<GlobalFooterComponents>();
const asFooterToken = asCxTokenSpec<FooterComponents>();

export {
GlobalFooterClean,
asGlobalFooterToken,
FooterClean,
asFooterToken,
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from '@bodiless/fclasses';
import { cxRewards } from './Rewards';
import { cxSocialLinks } from './SocialLinks';
import { asGlobalFooterToken } from './GlobalFooterClean';
import { asFooterToken } from './FooterClean';
import { cxFooterMenu } from '../FooterMenu';

const withCopyrightDesign = withDesign({
Expand All @@ -38,7 +38,7 @@ const withCopyrightDesign = withDesign({
}),
});

const Base = asGlobalFooterToken({
const Base = asFooterToken({
Components: {
Wrapper: startWith(Div),
Rewards: flowHoc(
Expand Down Expand Up @@ -92,11 +92,11 @@ const Base = asGlobalFooterToken({
},
});

const Default = asGlobalFooterToken({
const Default = asFooterToken({
...Base,
});

export const cxGlobalFooter = {
export const cxFooter = {
Base,
Default,
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* limitations under the License.
*/

export { cxGlobalFooter } from './cxGlobalFooter';
export { GlobalFooterClean, asGlobalFooterToken } from './GlobalFooterClean';
export type { GlobalFooterComponents, GlobalFooterProps } from './types';
export { cxFooter } from './cxFooter';
export { FooterClean, asFooterToken } from './FooterClean';
export type { FooterComponents, FooterProps } from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import { ComponentOrTag, DesignableComponentsProps } from '@bodiless/fclasses';

type GlobalFooterComponents = {
type FooterComponents = {
Wrapper: ComponentOrTag<any>,
Container: ComponentOrTag<any>,
SectionTop: ComponentOrTag<any>,
Expand All @@ -25,9 +25,9 @@ type GlobalFooterComponents = {
SocialLinks: ComponentOrTag<any>,
};

type GlobalFooterProps = DesignableComponentsProps<GlobalFooterComponents>;
type FooterProps = DesignableComponentsProps<FooterComponents>;

export type {
GlobalFooterComponents,
GlobalFooterProps,
FooterComponents,
FooterProps,
};
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Base = asMenuToken({
},
Layout: {
Wrapper: 'w-full md:flex md:justify-between md:flex-grow lg:h-full',
Item: 'md:w-1/4',
Item: 'md:min-w-1/4 md:w-full',
},
Theme: {
Item: cxSeparator.Default,
Expand Down
4 changes: 2 additions & 2 deletions packages/cx-layout/src/components/Layout/LayoutClean.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
A,
} from '@bodiless/fclasses';
import { asCxTokenSpec } from '@bodiless/cx-elements';
import { GlobalFooterClean } from '../GlobalFooter';
import { FooterClean } from '../Footer';
import { HeaderClean } from '../Header';
import { HelmetClean } from '../Helmet';
import { LayoutComponents, LayoutProps } from './types';
Expand All @@ -31,7 +31,7 @@ const layoutComponents: LayoutComponents = {
SkipToMainContent: A,
Helmet: HelmetClean,
SiteHeader: HeaderClean,
SiteFooter: GlobalFooterClean,
SiteFooter: FooterClean,
Container: Div,
PageTopper: Fragment,
PageCloser: Fragment,
Expand Down
4 changes: 2 additions & 2 deletions packages/cx-layout/src/components/Layout/tokens/cxLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
import { as } from '@bodiless/fclasses';
import { asLayoutToken } from '../LayoutClean';
import { cxGlobalFooter } from '../../GlobalFooter';
import { cxFooter } from '../../Footer';
import { cxHeader } from '../../Header';
import { cxHelmet } from '../../Helmet';

Expand All @@ -24,7 +24,7 @@ const Base = asLayoutToken({
Components: {
Helmet: as(cxHelmet.Default),
SiteHeader: as(cxHeader.Default),
SiteFooter: as(cxGlobalFooter.Default),
SiteFooter: as(cxFooter.Default),
},
Theme: {
Container: 'container mx-auto',
Expand Down
2 changes: 1 addition & 1 deletion packages/cx-layout/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

export { cxLayout, LayoutClean, asLayoutToken } from './components/Layout';
export { cxHeader, HeaderClean, asHeaderToken } from './components/Header';
export { cxGlobalFooter, GlobalFooterClean, asGlobalFooterToken } from './components/GlobalFooter';
export { cxFooter, FooterClean, asFooterToken } from './components/Footer';

0 comments on commit b13f2be

Please sign in to comment.