diff --git a/src/dzeio/Footer/Footer.module.styl b/src/dzeio/Footer/Footer.module.styl index 5c86f6e..159cdd5 100644 --- a/src/dzeio/Footer/Footer.module.styl +++ b/src/dzeio/Footer/Footer.module.styl @@ -13,6 +13,9 @@ li display inline-block + &.socials a + padding 0 8px + .animation animation grow 1s linear infinite display inline-block diff --git a/src/dzeio/Footer/Footer.stories.tsx b/src/dzeio/Footer/Footer.stories.tsx index 70397ad..bfbf401 100644 --- a/src/dzeio/Footer/Footer.stories.tsx +++ b/src/dzeio/Footer/Footer.stories.tsx @@ -1,5 +1,6 @@ import { Meta, Story } from '@storybook/react/types-6-0' import React from 'react' +import { Zap } from 'react-feather' import Component from '.' export default { @@ -10,6 +11,9 @@ export default { export const Basic: Story = (args: any) => let tmp = Basic.bind({}) -tmp.args = {links: [{name: 'test1', path: '/'}, {name: 'test2', path: '/'}, {name: 'test3', path: '/'}]} +tmp.args = { + links: [{name: 'test1', path: '/'}, {name: 'test2', path: '/'}, {name: 'test3', path: '/'}], + socials: [{icon: Zap, href: '/'}, {icon: '/16-16.svg', href: '/'}, {icon: Zap, href: '/'}] +} export const Normal = tmp diff --git a/src/dzeio/Footer/index.tsx b/src/dzeio/Footer/index.tsx index e647dd9..e7635cb 100644 --- a/src/dzeio/Footer/index.tsx +++ b/src/dzeio/Footer/index.tsx @@ -1,9 +1,10 @@ -import React from 'react' +import React, { FC } from 'react' import { Heart } from 'react-feather' import Link from '../Link' - +import { Icon } from 'react-feather' import Text from '../Text' import css from './Footer.module.styl' +import Image from 'next/image' interface Props { text?: string @@ -12,6 +13,10 @@ interface Props { path: string name: string }> + socials?: Array<{ + href: string + icon: Icon | string + }> } export default class Footer extends React.Component { @@ -27,6 +32,17 @@ export default class Footer extends React.Component {
  • {index !== 0 && (<> - )}{l.name}
  • ))} )} + {this.props.socials && ( +
      {this.props.socials.map((l, index) => ( +
    • + {typeof l.icon === 'string' ? ( + + ) : ( + + )} +
    • + ))}
    + )} ) } \ No newline at end of file