Sha256: 022de1df4c63417678037e95fe299f75fece63ed6789782afb7c56720ba9654d

Contents?: true

Size: 1.32 KB

Versions: 186

Compression:

Stored size: 1.32 KB

Contents

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

import { buildCss } 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},
  id?: string,
  padding?: string,
  paddingBottom?: string,
  paddingX?: string,
  separator?: boolean,
  spacing?: "none" | "between" | "around" | "evenly",
} & GlobalProps

// 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 (
    <>
      {separator &&
        <SectionSeparator />
      }
      <div className="dialog-pseudo-footer">
      </div>
      <Flex
          className={classnames(footerCSS, footerSpacing, className)}
          spacing={spacing}
      >
        {children}
      </Flex>
    </>
  )
}

export default DialogFooter

Version data entries

186 entries across 186 versions & 1 rubygems

Version Path
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements742 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements741 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements739 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.play824733 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3721 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.alphatestforselfhostfak720 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3719 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3717 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.24.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.23.0.pre.alpha.movemarkdown712 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.23.0.pre.alpha.movemarkdown708 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.23.0.pre.alpha.play698responsivespacingglobalprop703 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.23.0.pre.alpha.play698responsivespacingglobalprop701 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.23.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.22.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown696 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.22.0.pre.alpha.play698responsivespacingglobalprop690 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.22.0.pre.alpha.PBNTR12checkingemptyfilters686 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.22.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.21.0.pre.alpha.PLAY807RTEcustomtoolbar680 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx
playbook_ui-12.21.0 app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx