Sha256: eae91ecfbc0df7713a4560643015c5d1b7d967cca4e81ff12230f634c57404f4

Contents?: true

Size: 1.4 KB

Versions: 10

Compression:

Stored size: 1.4 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 | Function},
  id?: string,
  padding?: string,
  paddingBottom?: string,
  paddingX?: string,
  separator?: boolean,
  spacing?: "none" | "between" | "around" | "evenly",
} & GlobalProps

// Footer component
const DialogFooter = (props: DialogFooterProps) => {
  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">
      </div>
      <Flex
          className={classnames(footerCSS, footerSpacing, className)}
          spacing={spacing}
      >
        {children}
      </Flex>
    </div>
  )
}

export default DialogFooter

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
playbook_ui-13.14.0.pre.alpha.PLAY1109bugdisplaypropblocksfontcolor1784 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.14.0.pre.alpha.play1106filter1751 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.14.0.pre.alpha.play1106filter1748 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.14.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.13.0.pre.alpha.play10221678 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.13.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-13.12.0.pre.alpha.play10281596 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx