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    
Size: Mime:
import React from 'react'
import { isObj } from 'exotic'
import {
  StyledPaymentMethodHeading,
  StyledPaymentInformation,
  StyledOrderSummary,
} from './styled'
import { PaymentSummaryProps } from './typings'

function defaultRenderPaymentMethod(props: PaymentSummaryProps) {
  const { paymentMethodConfig } = props
  const headingLabel = isObj(paymentMethodConfig) && paymentMethodConfig.label
  const paymentInformationValue =
    isObj(paymentMethodConfig) && paymentMethodConfig.value

  return (
    <React.Fragment>
      <StyledPaymentMethodHeading breedType={'h4'} content={headingLabel} />
      <StyledPaymentInformation content={paymentInformationValue} />
    </React.Fragment>
  )
}

function defaultRenderOrderSummary(props: PaymentSummaryProps) {
  const { orderSummaryConfig } = props
  const title = isObj(orderSummaryConfig) && orderSummaryConfig.title
  const list = isObj(orderSummaryConfig) && orderSummaryConfig.list

  return <StyledOrderSummary title={title} list={list} />
}

export { defaultRenderOrderSummary, defaultRenderPaymentMethod }