Skip to content

Commit

Permalink
Merge pull request #36100 from neonbhai/new-workspace-tooltip-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins authored Feb 14, 2024
2 parents 756f846 + 843fb47 commit 2e3840f
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/pages/WorkspaceSwitcherPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import OptionsSelector from '@components/OptionsSelector';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import useActiveWorkspace from '@hooks/useActiveWorkspace';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -212,23 +213,25 @@ function WorkspaceSwitcherPage({policies}: WorkspaceSwitcherPageProps) {
{translate('common.workspaces')}
</Text>
</View>
<PressableWithFeedback
accessible={false}
role={CONST.ROLE.BUTTON}
onPress={() => {
App.createWorkspaceWithPolicyDraftAndNavigateToIt();
}}
>
{({hovered}) => (
<Icon
src={Expensicons.Plus}
width={12}
height={12}
additionalStyles={[styles.buttonDefaultBG, styles.borderRadiusNormal, styles.p2, hovered && styles.buttonHoveredBG]}
fill={theme.icon}
/>
)}
</PressableWithFeedback>
<Tooltip text={translate('workspace.new.newWorkspace')}>
<PressableWithFeedback
accessible={false}
role={CONST.ROLE.BUTTON}
onPress={() => {
App.createWorkspaceWithPolicyDraftAndNavigateToIt();
}}
>
{({hovered}) => (
<Icon
src={Expensicons.Plus}
width={12}
height={12}
additionalStyles={[styles.buttonDefaultBG, styles.borderRadiusNormal, styles.p2, hovered && styles.buttonHoveredBG]}
fill={theme.icon}
/>
)}
</PressableWithFeedback>
</Tooltip>
</View>

{usersWorkspaces.length > 0 ? (
Expand Down

0 comments on commit 2e3840f

Please sign in to comment.