3.0.1 • Published 9 months ago

@axa-fr/react-toolkit-layout-footer-client v3.0.1

Weekly downloads
154
License
MIT
Repository
github
Last release
9 months ago

@axa-fr/react-toolkit-layout-footer-client

  1. Installation
  2. Simple
  3. Complex
  4. Without Bottom

Installation

npm i @axa-fr/react-toolkit-layout-footer-client

Simple

Import

import {
  FooterClientList,
  FooterClientItem,
  FooterClient,
} from '@axa-fr/react-toolkit-layout-footer-client';
import '@axa-fr/react-toolkit-layout-footer-client/dist/af-footer-client.css';

Use

export const columns = [
  {
    title: 'Languages',
    links: [
      {
        text: 'Lorem',
        path: '/9',
      },
      {
        text: 'Young driver insurance',
        path: '/8',
      },
      {
        text: 'Home insurance',
        path: '/7',
      },
    ],
  },
  {
    title: 'Axa & You',
    links: [
      {
        text: 'Call us',
        path: '/6',
      },
      {
        text: 'Policy documents',
        path: '/5',
      },
      {
        text: 'Xtra by AXA',
        path: '/4',
      },
    ],
  },
  {
    title: 'Useful links',
    links: [
      {
        text: 'About us',
        path: '/3',
      },
      {
        text: 'Careers',
        path: '/2',
      },
      {
        text: 'Blog',
        path: '/1',
      },
    ],
  },
];

const simpleLayout = () => (
  <FooterClient copyright="Policy Privacy © 2021 AXA All Rights Reserved">
    {columns &&
      columns.map((column) => (
        <FooterClientList title={column.title} key={column.title}>
          {column.links.map((link) => (
            <FooterClientItem
              onClick={(e: string) => {
                console.log(e);
              }}
              path={link.path}
              key={link.path}>
              {link.text}
            </FooterClientItem>
          ))}
        </FooterClientList>
      ))}
  </FooterClient>
);
export default simpleLayout;

Complex

Import

import {
  FooterClientList,
  FooterClientItem,
  SocialNetwork,
  FooterClient,
  LanguageSelection,
} from '@axa-fr/react-toolkit-layout-footer-client';
import '@axa-fr/react-toolkit-layout-footer-client/dist/af-footer-client.css';

Use

export const columns = [
  {
    title: 'Languages',
    links: [
      {
        text: 'Lorem',
        path: '/9',
      },
      {
        text: 'Young driver insurance',
        path: '/8',
      },
      {
        text: 'Home insurance',
        path: '/7',
      },
    ],
  },
  {
    title: 'Axa & You',
    links: [
      {
        text: 'Call us',
        path: '/6',
      },
      {
        text: 'Policy documents',
        path: '/5',
      },
      {
        text: 'Xtra by AXA',
        path: '/4',
      },
    ],
  },
  {
    title: 'Useful links',
    links: [
      {
        text: 'About us',
        path: '/3',
      },
      {
        text: 'Careers',
        path: '/2',
      },
      {
        text: 'Blog',
        path: '/1',
      },
    ],
  },
];

export const languages = [
  {
    name: 'English',
    value: 'en',
  },
  {
    name: 'Chinese',
    value: 'cn',
  },
];

export const socialNetworkList = {
  facebook: '#',
  linkedin: '#',
  youtube: '#',
  instagram: '#',
  twitter: '#',
};

export const currentLanguage = 'en';

export const bottomComponent = (
  <LanguageSelection
    onClick={(e: string) => {
      console.log(e);
    }}
    languages={languages}
    currentLanguage={currentLanguage}
  />
);

const complexLayout = () => (
  <FooterClient
    copyright="Policy Privacy © 2021 AXA All Rights Reserved"
    bottomComponent={bottomComponent}>
    {columns &&
      columns.map((column) => (
        <FooterClientList title={column.title} key={column.title}>
          {column.links.map((link) => (
            <FooterClientItem
              onClick={(e: string) => {
                console.log(e);
              }}
              path={link.path}
              key={link.path}>
              {link.text}
            </FooterClientItem>
          ))}
        </FooterClientList>
      ))}
    <FooterClientList title="Follow AXA">
      <SocialNetwork
        onClick={(e: string) => {
          console.log(e);
        }}
        list={socialNetworkList}
      />
    </FooterClientList>
  </FooterClient>
);
export default complexLayout;

Without Bottom

Import

import {
  FooterClientList,
  FooterClientItem,
  SocialNetwork,
  FooterClient,
} from '@axa-fr/react-toolkit-layout-footer-client';
import '@axa-fr/react-toolkit-layout-footer-client/dist/af-footer-client.css';

Use

export const columns = [
  {
    title: 'Languages',
    links: [
      {
        text: 'Lorem',
        path: '/9',
      },
      {
        text: 'Young driver insurance',
        path: '/8',
      },
      {
        text: 'Home insurance',
        path: '/7',
      },
    ],
  },
  {
    title: 'Axa & You',
    links: [
      {
        text: 'Call us',
        path: '/6',
      },
      {
        text: 'Policy documents',
        path: '/5',
      },
      {
        text: 'Xtra by AXA',
        path: '/4',
      },
    ],
  },
  {
    title: 'Useful links',
    links: [
      {
        text: 'About us',
        path: '/3',
      },
      {
        text: 'Careers',
        path: '/2',
      },
      {
        text: 'Blog',
        path: '/1',
      },
    ],
  },
];

export const socialNetworkList = {
  facebook: '#',
  linkedin: '#',
  youtube: '#',
  instagram: '#',
  twitter: '#',
};

const WithoutBottom = () => (
  <FooterClient copyright="Policy Privacy © 2021 AXA All Rights Reserved">
    {columns &&
      columns.map((column) => (
        <FooterClientList title={column.title} key={column.title}>
          {column.links.map((link) => (
            <FooterClientItem
              onClick={(e: string) => {
                console.log(e);
              }}
              path={link.path}
              key={link.path}>
              {link.text}
            </FooterClientItem>
          ))}
        </FooterClientList>
      ))}

    <FooterClientList title="Follow AXA">
      <SocialNetwork
        onClick={(e: string) => {
          console.log(e);
        }}
        list={socialNetworkList}
      />
    </FooterClientList>
  </FooterClient>
);

export default WithoutBottom;
3.0.1

9 months ago

3.0.0

9 months ago

3.0.0-alpha.1

10 months ago

3.0.0-alpha.2

9 months ago

3.0.0-alpha.0

11 months ago

2.3.1

1 year ago

2.3.1-alpha.0

1 year ago

2.3.0

1 year ago

2.3.0-alpha.2

1 year ago

2.3.0-alpha.0

1 year ago

2.2.0

1 year ago

2.2.0-alpha.0

1 year ago

2.2.0-alpha.1

1 year ago

2.1.1

2 years ago

2.1.1-alpha.0

2 years ago

2.1.0

2 years ago

2.1.0-alpha.6

2 years ago

2.1.0-alpha.5

2 years ago

2.1.0-alpha.4

2 years ago

2.1.0-alpha.3

2 years ago

2.0.1-alpha.1

2 years ago

2.1.0-alpha.2

2 years ago

2.1.0-alpha.1

2 years ago

2.0.0

3 years ago

2.0.1-alpha.0

3 years ago

2.0.0-alpha.11

3 years ago

2.0.0-alpha.8

3 years ago

2.0.0-alpha.9

3 years ago

2.0.0-alpha.10

3 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.4

4 years ago

2.0.0-alpha.5

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

2.0.0-alpha.0

4 years ago

2.0.0-alpha.1

4 years ago

1.4.0-alpha.1

4 years ago

1.4.0-alpha.0

5 years ago

1.3.23

5 years ago

1.3.21

5 years ago

1.3.16

5 years ago

1.3.15

5 years ago

1.3.14

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.9-alpha.0

5 years ago

1.3.8-alpha.0

5 years ago

1.3.7-alpha.0

5 years ago

1.3.6

5 years ago

1.3.6-alpha.0

5 years ago

1.3.5-alpha.0

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.2-alpha.0

6 years ago

1.2.16

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.12

6 years ago

1.2.11

6 years ago

1.2.10

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.6-alpha.0

6 years ago

1.2.5

6 years ago

1.2.5-alpha.0

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.2-alpha.0

7 years ago