mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 14:33:34 +00:00
[ENG-1244] Fix highlighted RenameTextBox text colour on light theme (#1499)
fix text color
This commit is contained in:
parent
be63385dd1
commit
d9c8af0551
|
@ -155,7 +155,7 @@ export const RenameTextBox = forwardRef<HTMLDivElement, Props>(
|
|||
suppressContentEditableWarning
|
||||
className={clsx(
|
||||
'cursor-default truncate rounded-md px-1.5 py-px text-xs text-ink outline-none',
|
||||
allowRename && 'whitespace-normal bg-app ring-2 ring-accent-deep',
|
||||
allowRename && 'whitespace-normal bg-app !text-ink ring-2 ring-accent-deep',
|
||||
className
|
||||
)}
|
||||
onDoubleClick={(e) => {
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
type ExplorerItem
|
||||
} from '@sd/client';
|
||||
import { toast } from '@sd/ui';
|
||||
import { useIsDark } from '~/hooks';
|
||||
|
||||
import { useExplorerContext } from '../Context';
|
||||
import { RenameTextBox } from '../FilePath/RenameTextBox';
|
||||
|
@ -19,10 +20,11 @@ interface Props {
|
|||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export const RenamableItemText = ({ item, allowHighlight, style }: Props) => {
|
||||
export const RenamableItemText = ({ item, allowHighlight = true, style }: Props) => {
|
||||
const rspc = useRspcLibraryContext();
|
||||
const explorer = useExplorerContext();
|
||||
const quickPreviewStore = useQuickPreviewStore();
|
||||
const isDark = useIsDark();
|
||||
|
||||
const itemData = getExplorerItemData(item);
|
||||
|
||||
|
@ -111,8 +113,8 @@ export const RenamableItemText = ({ item, allowHighlight, style }: Props) => {
|
|||
disabled={disabled}
|
||||
onRename={handleRename}
|
||||
className={clsx(
|
||||
'text-center font-medium text-ink',
|
||||
selected && allowHighlight !== false && 'bg-accent text-white dark:text-ink'
|
||||
'text-center font-medium',
|
||||
selected && allowHighlight && ['bg-accent', !isDark && 'text-white']
|
||||
)}
|
||||
style={style}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue