Skip to content

Commit

Permalink
chore: final button cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Jan 3, 2024
1 parent ed1611a commit c15d569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/components/PageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from 'clsx'
import { useValues } from 'kea'
import { Within3000PageHeaderContext } from 'lib/lemon-ui/LemonButton/LemonButton'
import { WithinPageHeaderContext } from 'lib/lemon-ui/LemonButton/LemonButton'
import { createPortal } from 'react-dom'
import { DraggableToNotebookProps } from 'scenes/notebooks/AddToNotebook/DraggableToNotebook'

Expand All @@ -23,7 +23,7 @@ export function PageHeader({ caption, buttons, tabbedPage }: PageHeaderProps): J
{buttons &&
actionsContainer &&
createPortal(
<Within3000PageHeaderContext.Provider value={true}>{buttons}</Within3000PageHeaderContext.Provider>,
<WithinPageHeaderContext.Provider value={true}>{buttons}</WithinPageHeaderContext.Provider>,
actionsContainer
)}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const LemonButton: React.FunctionComponent<LemonButtonProps & React.RefAt
ref
): JSX.Element => {
const [popoverVisibility, popoverPlacement] = useContext(PopoverReferenceContext) || [false, null]
const within3000PageHeader = useContext(Within3000PageHeaderContext)
const within3000PageHeader = useContext(WithinPageHeaderContext)

if (!active && popoverVisibility) {
active = true
Expand Down Expand Up @@ -268,7 +268,7 @@ export const LemonButton: React.FunctionComponent<LemonButtonProps & React.RefAt
)
LemonButton.displayName = 'LemonButton'

export const Within3000PageHeaderContext = React.createContext<boolean>(false)
export const WithinPageHeaderContext = React.createContext<boolean>(false)

export interface LemonButtonWithDropdownProps extends LemonButtonPropsBase {
dropdown: LemonButtonDropdown
Expand Down

0 comments on commit c15d569

Please sign in to comment.