Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/harmony/src/components/internal/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Menu = (props: MenuProps) => {
const { children, PaperProps, ...other } = props

return (
<Popup {...other}>
<Popup {...other} disableDefaultStyles>
<Paper mt='s' border='strong' shadow='far' {...PaperProps}>
{children}
</Paper>
Expand Down
13 changes: 10 additions & 3 deletions packages/harmony/src/components/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ export const PopupInternal = forwardRef<
shadow = 'mid',
fixed,
takeWidthOfAnchor,
disableAutoFlip = false
disableAutoFlip = false,
disableDefaultStyles = false
} = props
const { spring, shadows } = useTheme()

Expand Down Expand Up @@ -421,8 +422,14 @@ export const PopupInternal = forwardRef<
const AnimatedDiv = animatedAny.div as any
return (
<AnimatedDiv
className={cn(styles.popup, className)}
css={{ boxShadow: shadows[shadow] }}
className={cn({
[styles.popup]: !disableDefaultStyles
}, className)}
css={
disableDefaultStyles
? undefined
: { boxShadow: shadows[shadow] }
}
ref={popupRef}
key={key}
style={{
Expand Down
6 changes: 6 additions & 0 deletions packages/harmony/src/components/popup/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,10 @@ export type PopupProps = {
* Whether to take the width of the anchor element
*/
takeWidthOfAnchor?: boolean

/**
* Disable Popup's default bordered and elevated surface styles.
* Useful when children provide their own surface chrome.
*/
disableDefaultStyles?: boolean
}
Loading