Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / components / organisms / Footer / renderProps.tsx
Size: Mime:
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,
}