Skip to content

Commit

Permalink
remove tooltip inside publish popover
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Aug 4, 2023
1 parent 7faa679 commit a2d32e5
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions app/layout/project/sidebar/project/header/project-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import ConfirmationPrompt from 'components/confirmation-prompt';
import Icon from 'components/icon/component';
import Modal from 'components/modal';
import { Popover, PopoverContent, PopoverTrigger } from 'components/popover';
import Tooltip from 'components/tooltip';
import DownloadProjectModal from 'layout/projects/common/download-modal';
import { cn } from 'utils/cn';

Expand Down Expand Up @@ -168,35 +167,18 @@ const ProjectButton = (): JSX.Element => {
>
{!isPublic && (
<>
<Tooltip
disabled={isOwner && SCENARIOS_RUNNED}
arrow
placement="top"
content={
<div
className="rounded bg-white p-4 text-xs text-gray-500"
style={{
boxShadow: '0 4px 20px rgba(0,0,0,0.25)',
maxWidth: 200,
}}
>
You need to be the owner and have at least one scenario runned to publish the
project.
</div>
}
<button
className="group flex w-full cursor-pointer items-center space-x-2 rounded-t-2xl px-4 py-2 hover:bg-gray-500"
disabled={!isOwner || !SCENARIOS_RUNNED}
onClick={() => setPublishModal(true)}
>
<button
className="group flex w-full cursor-pointer items-center space-x-2 rounded-t-2xl px-4 py-2 hover:bg-gray-500"
disabled={!isOwner || !SCENARIOS_RUNNED}
onClick={() => setPublishModal(true)}
>
<Icon
icon={COMMUNITY_SVG}
className="h-5 w-5 text-gray-400 group-hover:text-white"
/>
<p>Publish</p>
</button>
</Tooltip>
<Icon
icon={COMMUNITY_SVG}
className="h-5 w-5 text-gray-400 group-hover:text-white"
/>
<p>Publish</p>
</button>

<Modal
id="publish-project-modal"
dismissable
Expand Down

0 comments on commit a2d32e5

Please sign in to comment.