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

/**
 * render header view
 */
function defaultRenderHeaderView(
  props: ApprovalProps,
  state: AnimatedCardState
) {
  return (
    <StyledApprovalStatus
      state={state}
      {...props}
      isExpanded={state.isExpanded}
    />
  )
}
function defaultRenderButtonGroup(
  props: ApprovalProps,
  state: AnimatedCardState
) {
  return <Empty />
}

/**
 * render expandable view
 */
function defaultRenderExpandableView(
  props: ApprovalProps,
  state?: AnimatedCardState
) {
  return (
    <React.Fragment>
      <StyledPaymentSummary {...props} shouldHideActionButtons={true} />
      <StyledProductItemList {...props} />
      <StyledUserComment {...props} />
    </React.Fragment>
  )
}
/**
 * render footer view
 */
function defaultRenderFooterView(
  props: ApprovalProps,
  state?: AnimatedCardState
) {
  return <Empty />
}

export {
  defaultRenderHeaderView,
  defaultRenderExpandableView,
  defaultRenderFooterView,
  defaultRenderButtonGroup,
}