Sha256: 277d3646efd26090ad5885cf28ef11256bf27070582a0ac9e286cef9e51ec83b

Contents?: true

Size: 1.42 KB

Versions: 643

Compression:

Stored size: 1.42 KB

Contents

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

import { buildCss, buildHtmlProps } from '../../utilities/props'
import { GlobalProps, globalProps } from '../../utilities/globalProps'

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


type DialogFooterProps = {
  aria?: {[key: string]: string},
  children: React.ReactChild[] | React.ReactChild | string,
  className?: string,
  data?: {[key: string]: string},
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
  id?: string,
  padding?: string,
  paddingBottom?: string,
  paddingX?: string,
  separator?: boolean,
  spacing?: "none" | "between" | "around" | "evenly",
} & GlobalProps

// Footer component
const DialogFooter = (props: DialogFooterProps): React.ReactElement => {
  const {
    children,
    className,
    htmlOptions = {},
    spacing = "between",
    separator = false,
  } = props

  const footerCSS = buildCss("dialog_footer")
  const footerSpacing = globalProps(props)
  const htmlProps = buildHtmlProps(htmlOptions)

  return (
    <div 
        {...htmlProps}
    >
      {separator &&
        <SectionSeparator />
      }
      <div className="dialog-pseudo-footer" />
      <Flex
          className={classnames(footerCSS, footerSpacing, className)}
          spacing={spacing}
      >
        {children}
      </Flex>
    </div>
  )
}

export default DialogFooter

Version data entries

643 entries across 643 versions & 1 rubygems

Version Path
playbook_ui-14.10.0.pre.rc.23 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.22 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.21 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.play1703errorstatealignment5060 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.20 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.19 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.18 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.PLAY1660reactdropzone5020 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.17 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.16 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.play17004992 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.play1703errorstatealignment4991 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.15 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.PLAY16264952 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.PLAY1731inputmasking4927 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.play1742globalheightfixes4926 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.play1742globalheightfixes4925 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.14 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.10.0.pre.rc.13 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-14.9.0.pre.alpha.PBNTR746datepickerdefaultbug4903 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx