style: ellipsis consistent style (#632)

* style: ellipsis consistent style

* style: consistent ellipsis menu for module and cycle
This commit is contained in:
Anmol Singh Bhatia 2023-03-31 00:31:00 +05:30 committed by GitHub
parent 3cf2172520
commit 5d0533a44f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 48 additions and 45 deletions

View file

@ -305,7 +305,9 @@ export const ModuleDetailsSidebar: React.FC<Props> = ({
<Popover.Panel className="absolute top-10 -right-5 z-20 transform overflow-hidden">
<DatePicker
selected={
watch("target_date") ? new Date(`${watch("target_date")}`) : new Date()
watch("target_date")
? new Date(`${watch("target_date")}`)
: new Date()
}
onChange={(date) => {
submitChanges({
@ -332,18 +334,18 @@ export const ModuleDetailsSidebar: React.FC<Props> = ({
<div className="flex items-start justify-between gap-2 w-full ">
<h4 className="text-xl font-semibold text-gray-900">{module.name}</h4>
<CustomMenu width="lg" ellipsis>
<CustomMenu.MenuItem onClick={handleCopyText}>
<span className="flex items-center justify-start gap-2 text-gray-800">
<LinkIcon className="h-4 w-4" />
<span>Copy Link</span>
</span>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem onClick={() => setModuleDeleteModal(true)}>
<span className="flex items-center justify-start gap-2 text-gray-800">
<span className="flex items-center justify-start gap-2">
<TrashIcon className="h-4 w-4" />
<span>Delete</span>
</span>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem onClick={handleCopyText}>
<span className="flex items-center justify-start gap-2">
<LinkIcon className="h-4 w-4" />
<span>Copy link</span>
</span>
</CustomMenu.MenuItem>
</CustomMenu>
</div>

View file

@ -152,21 +152,21 @@ export const SingleModuleCard: React.FC<Props> = ({ module, handleEditModule })
<CustomMenu width="auto" verticalEllipsis>
<CustomMenu.MenuItem onClick={handleEditModule}>
<span className="flex items-center justify-start gap-2 text-gray-700">
<span className="flex items-center justify-start gap-2">
<PencilIcon className="h-4 w-4" />
<span>Edit Module</span>
<span>Edit module</span>
</span>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem onClick={handleDeleteModule}>
<span className="flex items-center justify-start gap-2 text-gray-700">
<span className="flex items-center justify-start gap-2">
<TrashIcon className="h-4 w-4" />
<span>Delete Module</span>
<span>Delete module</span>
</span>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem onClick={handleCopyText}>
<span className="flex items-center justify-start gap-2 text-gray-700">
<span className="flex items-center justify-start gap-2">
<LinkIcon className="h-4 w-4" />
<span>Copy Module Link</span>
<span>Copy module link</span>
</span>
</CustomMenu.MenuItem>
</CustomMenu>