Repository URL to install this package:
|
Version:
2.8.0-studio-release ▾
|
import React from 'react'
import { isSafe } from 'exotic'
import { FooterProps } from './typings'
import {
StyledMobilePoweredByLabel,
StyledMobilePoweredByValue,
StyledPoweredByLabel,
StyledPoweredByValue,
StyledCopyRight,
StyledMultipleLinkList,
StyledLabel,
StyledLogoIcon,
StyledSocialIconList,
} from './styled'
function defaultRenderLogo(props: FooterProps) {
const { logoType, logoIcon, breed } = props
const name = isSafe(logoType) ? logoType : 'tgiant'
const qa = logoIcon && logoIcon.dataQa ? logoIcon.dataQa : ''
return <StyledLogoIcon type={name} dataQa={qa} breed={breed} />
}
function defaultRenderMobilePoweredBy(props: FooterProps) {
const { poweredByData } = props
const label = poweredByData && poweredByData.label
const value = poweredByData && poweredByData.value
return (
<React.Fragment>
<StyledMobilePoweredByLabel content={label} />
<StyledMobilePoweredByValue content={value} />
</React.Fragment>
)
}
function defaultRenderPoweredByLabel(props: FooterProps) {
const { poweredByData } = props
const label = poweredByData && poweredByData.label
return <StyledPoweredByLabel content={label} />
}
function defaultRenderPoweredByValue(props: FooterProps) {
const { poweredByData } = props
const value = poweredByData && poweredByData.value
return <StyledPoweredByValue content={value} />
}
function defaultRenderCopyright(props: FooterProps) {
const { copyrightData } = props
return <StyledCopyRight {...copyrightData} />
}
function defaultRenderSocialIconLabel(props: FooterProps) {
const { connectText } = props
return <StyledLabel content={connectText} />
}
function defaultRenderSocialIcons(props: FooterProps) {
const { listOfSocialIcons } = props
return <StyledSocialIconList iconsList={listOfSocialIcons} />
}
function defaultRenderLinkList(props: FooterProps) {
const { listOfLinks } = props
return <StyledMultipleLinkList list={listOfLinks} />
}
export {
defaultRenderLogo,
defaultRenderMobilePoweredBy,
defaultRenderPoweredByLabel,
defaultRenderPoweredByValue,
defaultRenderCopyright,
defaultRenderSocialIcons,
defaultRenderLinkList,
defaultRenderSocialIconLabel,
}