@@ -7,6 +7,7 @@ import {get} from '../constants'
77import { useOnEscapePress , useProvidedRefOrCreate } from '../hooks'
88import { useFocusTrap } from '../hooks/useFocusTrap'
99import sx , { SxProp } from '../sx'
10+ import { defaultSxProp } from '../utils/defaultSxProp'
1011import { XIcon } from '@primer/octicons-react'
1112import { useFocusZone } from '../hooks/useFocusZone'
1213import { FocusKeys } from '@primer/behaviors'
@@ -40,23 +41,12 @@ export type DialogButtonProps = Omit<ButtonProps, 'content'> & {
4041 */
4142 autoFocus ?: boolean
4243
43- /**
44- * The HTML element to use.
45- */
46- as ?: 'button' | 'a'
47-
48- /**
49- * The URL to link to if this is a link (a) button.
50- */
51- href ?: string
52-
5344 /**
5445 * A reference to the rendered Button’s DOM node, used together with
5546 * `autoFocus` for `focusTrap`’s `initialFocus`.
5647 */
5748 ref ?: React . RefObject < HTMLButtonElement >
58- } & SxProp &
59- React . ButtonHTMLAttributes < HTMLButtonElement >
49+ }
6050
6151/**
6252 * Props to customize the rendering of the Dialog.
@@ -411,12 +401,12 @@ const Buttons: React.FC<React.PropsWithChildren<{buttons: DialogButtonProps[]}>>
411401 return (
412402 < >
413403 { buttons . map ( ( dialogButtonProps , index ) => {
414- const { content, buttonType = 'normal' , autoFocus = false , ...buttonProps } = dialogButtonProps
404+ const { content, buttonType = 'normal' , autoFocus = false , ...rest } = dialogButtonProps
415405 return (
416406 < Button
417407 key = { index }
418408 variant = { buttonType === 'normal' ? 'default' : buttonType }
419- { ...buttonProps }
409+ { ...rest }
420410 ref = { autoFocus && autoFocusCount === 0 ? ( autoFocusCount ++ , autoFocusRef ) : null }
421411 >
422412 { content }
0 commit comments