refactor: file context menu icons
This commit is contained in:
@@ -3,6 +3,7 @@ import MenuItem from '../Menu/MenuItem'
|
|||||||
import { useApplication } from '../ApplicationProvider'
|
import { useApplication } from '../ApplicationProvider'
|
||||||
import { FileBackupRecord, FileItem } from '@standardnotes/snjs'
|
import { FileBackupRecord, FileItem } from '@standardnotes/snjs'
|
||||||
import { dateToStringStyle1 } from '@/Utils/DateUtils'
|
import { dateToStringStyle1 } from '@/Utils/DateUtils'
|
||||||
|
import { MenuItemIconSize } from '@/Constants/TailwindClassNames'
|
||||||
|
|
||||||
export const FileContextMenuBackupOption: FunctionComponent<{ file: FileItem }> = ({ file }) => {
|
export const FileContextMenuBackupOption: FunctionComponent<{ file: FileItem }> = ({ file }) => {
|
||||||
const application = useApplication()
|
const application = useApplication()
|
||||||
@@ -28,7 +29,7 @@ export const FileContextMenuBackupOption: FunctionComponent<{ file: FileItem }>
|
|||||||
{backupInfo && (
|
{backupInfo && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={'check-circle'}
|
icon={'check-circle'}
|
||||||
iconClassName={'text-success mt-1'}
|
iconClassName={`text-success mt-1 ${MenuItemIconSize}`}
|
||||||
className={'items-start'}
|
className={'items-start'}
|
||||||
onClick={openFileBackup}
|
onClick={openFileBackup}
|
||||||
>
|
>
|
||||||
@@ -43,7 +44,7 @@ export const FileContextMenuBackupOption: FunctionComponent<{ file: FileItem }>
|
|||||||
<MenuItem
|
<MenuItem
|
||||||
icon={'safe-square'}
|
icon={'safe-square'}
|
||||||
className={'items-start'}
|
className={'items-start'}
|
||||||
iconClassName={'text-neutral mt-1'}
|
iconClassName={`text-neutral mt-1 ${MenuItemIconSize}`}
|
||||||
onClick={configureFileBackups}
|
onClick={configureFileBackups}
|
||||||
>
|
>
|
||||||
<div className="ml-2">
|
<div className="ml-2">
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const FileMenuOptions: FunctionComponent<Props> = ({
|
|||||||
void filesController.setProtectionForFiles(hasProtectedFiles, selectedFiles)
|
void filesController.setProtectionForFiles(hasProtectedFiles, selectedFiles)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon type="lock" className="mr-2 text-neutral" />
|
<Icon type="lock" className={`mr-2 text-neutral ${MenuItemIconSize}`} />
|
||||||
Password protect
|
Password protect
|
||||||
</MenuSwitchButtonItem>
|
</MenuSwitchButtonItem>
|
||||||
<HorizontalSeparator classes="my-1" />
|
<HorizontalSeparator classes="my-1" />
|
||||||
@@ -111,7 +111,7 @@ const FileMenuOptions: FunctionComponent<Props> = ({
|
|||||||
void filesController.downloadFiles(selectedFiles)
|
void filesController.downloadFiles(selectedFiles)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon type="download" className="mr-2 text-neutral" />
|
<Icon type="download" className={`mr-2 text-neutral ${MenuItemIconSize}`} />
|
||||||
Download
|
Download
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{shouldShowRenameOption && (
|
{shouldShowRenameOption && (
|
||||||
@@ -120,7 +120,7 @@ const FileMenuOptions: FunctionComponent<Props> = ({
|
|||||||
renameToggleCallback?.(true)
|
renameToggleCallback?.(true)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon type="pencil" className="mr-2 text-neutral" />
|
<Icon type="pencil" className={`mr-2 text-neutral ${MenuItemIconSize}`} />
|
||||||
Rename
|
Rename
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
@@ -130,7 +130,7 @@ const FileMenuOptions: FunctionComponent<Props> = ({
|
|||||||
void filesController.deleteFilesPermanently(selectedFiles)
|
void filesController.deleteFilesPermanently(selectedFiles)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon type="trash" className="mr-2 text-danger" />
|
<Icon type="trash" className={`mr-2 text-danger ${MenuItemIconSize}`} />
|
||||||
<span className="text-danger">Delete permanently</span>
|
<span className="text-danger">Delete permanently</span>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const AddTagOption: FunctionComponent<Props> = ({
|
|||||||
ref={buttonRef}
|
ref={buttonRef}
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Icon type="hashtag" className={`${iconClassName} mr-2 text-neutral`} />
|
<Icon type="hashtag" className={iconClassName} />
|
||||||
Add tag
|
Add tag
|
||||||
</div>
|
</div>
|
||||||
<Icon type="chevron-right" className="text-neutral" />
|
<Icon type="chevron-right" className="text-neutral" />
|
||||||
|
|||||||
Reference in New Issue
Block a user