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    
ui-component-library / src / components / presets / B2B / Approval / renderProps.tsx
Size: Mime:
import React from 'react'
import { AnimatedCardState } from 'presets/AnimatedExpandableCard'
import { ApprovalProps } from './typings'
import {
  StyledPaymentSummary,
  StyledProductItemList,
  StyledApprovalStatus,
  StyledUserComment,
} from './styled'

function defaultRenderHeaderView(
  props: ApprovalProps,
  state: AnimatedCardState
) {
  return (
    <StyledApprovalStatus
      {...props}
      state={state}
      isExpanded={state.isExpanded}
    />
  )
}

function defaultRenderExpandabelView(props: ApprovalProps) {
  return (
    <React.Fragment>
      <StyledPaymentSummary
        {...props}
        shouldHideActionButtons={true}
        isPurchaseOrder={props.isPurchaseOrder}
      />
      <StyledProductItemList {...props} />
      <StyledUserComment {...props} />
    </React.Fragment>
  )
}

export { defaultRenderHeaderView, defaultRenderExpandabelView }