Skip to content

Commit

Permalink
chore: migrate to @blueprintjs/popover2
Browse files Browse the repository at this point in the history
  • Loading branch information
KochiyaOcean committed Aug 29, 2022
1 parent 9ac7cb8 commit 6ffecd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
19 changes: 8 additions & 11 deletions views/components/etc/overlay.es
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, { useContext } from 'react'
import {
Alert as BAlert,
Dialog as BDialog,
Tooltip as BTooltip,
Popover as BPopover,
Overlay as BOverlay,
} from '@blueprintjs/core'
import { Alert as BAlert, Dialog as BDialog, Overlay as BOverlay } from '@blueprintjs/core'
import { Popover2, Tooltip2 } from '@blueprintjs/popover2'

import '@blueprintjs/popover2/lib/css/blueprint-popover2.css'

import { WindowEnv } from './window-env'

Expand All @@ -22,15 +19,15 @@ export const Dialog = ({ children, ...props }) => (
)

export const Tooltip = ({ children, ...props }) => (
<BTooltip portalContainer={useContext(WindowEnv).mountPoint} {...props}>
<Tooltip2 portalContainer={useContext(WindowEnv).mountPoint} {...props}>
{children}
</BTooltip>
</Tooltip2>
)

export const Popover = ({ children, ...props }) => (
<BPopover portalContainer={useContext(WindowEnv).mountPoint} {...props}>
<Popover2 portalContainer={useContext(WindowEnv).mountPoint} {...props}>
{children}
</BPopover>
</Popover2>
)

export const Overlay = ({ children, ...props }) => (
Expand Down
1 change: 1 addition & 0 deletions views/components/tab-area/plugin-window-wrapper.es
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const stylesheetTagsWithHref = [
'electron-react-titlebar/assets/style.css',
'react-resizable/css/styles.css',
'react-grid-layout/css/styles.css',
'@blueprintjs/popover2/lib/css/blueprint-popover2.css',
]
.map((href) => `<link rel="stylesheet" type="text/css" href="${fileUrl(require.resolve(href))}">`)
.join('')
Expand Down

0 comments on commit 6ffecd9

Please sign in to comment.