Skip to content

Commit

Permalink
[components] Sort DialogPopover's props
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent 18739f0 commit d32e54a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/@sanity/components/src/dialogs/PopoverDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ interface PopoverDialogProps {
children: React.ReactNode
color?: 'default' | 'danger'
hasAnimation?: boolean
onClose?: () => void
onAction?: (action: DialogAction) => void
onClickOutside?: () => void
onClose?: () => void
onEscape?: (event: KeyboardEvent) => void
onAction?: (action: DialogAction) => void
padding?: 'none' | 'small' | 'medium' | 'large'
placement?: Placement
referenceElement?: HTMLElement | null
Expand All @@ -32,20 +32,20 @@ interface PopoverDialogProps {

function PopoverDialog(props: PopoverDialogProps) {
const {
title,
color,
actions = [],
children,
actions,
color,
hasAnimation,
onAction,
onClose,
onClickOutside,
onClose,
onEscape,
padding = 'medium',
placement = 'auto',
referenceElement: referenceElementProp,
size = 'medium',
useOverlay = false,
hasAnimation,
referenceElement: referenceElementProp
title,
useOverlay = false
} = props

const [targetElement, setTargetElement] = useState<HTMLDivElement | null>(null)
Expand Down Expand Up @@ -137,7 +137,7 @@ function PopoverDialog(props: PopoverDialogProps) {
<div className={styles.contentWrapper}>{children}</div>
</div>

{actions && actions.length > 0 && (
{actions.length > 0 && (
<div className={styles.footer}>
<ButtonGrid align="end" secondary={primaryActionButtons}>
{secondaryActionButtons}
Expand Down

0 comments on commit d32e54a

Please sign in to comment.