Skip to content

Commit

Permalink
fix: add tooltip limit (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyuhen authored Mar 31, 2020
1 parent a99512b commit af8dbf8
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from 'react'
import {css} from 'aphrodite/no-important'
import {ua} from 'griffith-utils'
import styles from '../styles'
import Icon from '../../Icon'
import * as icons from '../../Icon/icons/controller'
import Tooltip from '../../Tooltip'
import Hover from '../../Hover'

const {isMobile} = ua

const FullScreenButtonItem = ({isFullScreen, onClick}) => (
<Hover className={css(styles.menuContainer)}>
{isFullScreenHovered => (
Expand All @@ -21,13 +24,15 @@ const FullScreenButtonItem = ({isFullScreen, onClick}) => (
isFullScreen && styles.fullScreenTooltipWide
)}
>
<Tooltip
content={
isFullScreen
? 'action-exit-fullscreen'
: 'action-enter-fullscreen'
}
/>
{!isMobile && (
<Tooltip
content={
isFullScreen
? 'action-exit-fullscreen'
: 'action-enter-fullscreen'
}
/>
)}
</div>
</React.Fragment>
)}
Expand Down

0 comments on commit af8dbf8

Please sign in to comment.