import { Button, Card, Group, Stack, Text, TextInput } from '@mantine/core'; import { useCommonHooks, useMutationAPI } from 'hooks'; import { useState } from 'react'; import { textInputClasses } from 'styles'; export function EditBackground({ fileName, setFileName, inUseBackgrounds, setBackground, setNewFileName, setEditing, }: { fileName: string; setFileName: (searchValue: string) => void; inUseBackgrounds: string[]; setBackground: React.Dispatch>; setNewFileName: (searchValue: string) => void; setEditing: React.Dispatch>; }) { const [rename, setRename] = useState(''); const { mutateAsync } = useMutationAPI(); const { theme } = useCommonHooks(); return ( Editing {fileName} {inUseBackgrounds.includes(fileName) && ( Updating the name will update the associated themes. )} setRename(e.target.value)} styles={ theme.textShadowsEnabled && { label: { boxShadow: '2px 2px var(--mantine-color-border-0)' }, } } /> ); }