Sha256: 7691df021cc0e6621d5e98ef2636eb7bba78986d7c946dd036d87a044dbe50ea

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'

import { buildCss } from '../../utilities/props'
import { globalProps } from '../../utilities/globalProps'

import Flex from '../../pb_flex/_flex'
import SectionSeparator from '../../pb_section_separator/_section_separator'


type DialogFooterProps = {
  aria?: object,
  children: array<React.ReactNode> | React.ReactNode | string,
  className?: string,
  closeable: boolean,
  data?: object,
  id?: string,
  padding?: string,
  paddingBottom?: string,
  paddingX?: string,
  separator: boolean,
  spacing?: string,
}

// Footer component
const DialogFooter = (props: DialogFooterProps) => {
  const {
    children,
    padding = "sm",
    paddingBottom = "sm",
    paddingX = "sm",
    className,
    spacing = "between",
    separator = false,
  } = props

  const footerCSS = buildCss("dialog_footer")
  const footerSpacing = globalProps(props, { padding, paddingBottom, paddingX })

  return (
    <>
      <If condition={separator}>
        <SectionSeparator />
      </If>
      <Flex
          className={classnames(footerCSS, footerSpacing, className)}
          spacing={spacing}
      >
        {children}
      </Flex>
    </>
  )
}

export default DialogFooter

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
playbook_ui-11.6.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.5.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.7.0.pre.alpha.pre.guagechart1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.6.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.6.0.pre.alpha.rubocopperf1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.6.1.pre.alpha.rubocop.pre.performance1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.5.0.pre.alpha.pre.rubocop app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.6.0.pre.alpha.momenttz1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.5.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.4.0.pre.alpha.rubytheme2 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
playbook_ui-11.4.0.pre.alpha.rubytheme1 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx