Make batch editing labels responsive

This commit is contained in:
Sam Becker 2024-07-21 19:03:45 -05:00
parent cb6fce826d
commit 69fa01e20b

View File

@ -16,6 +16,7 @@ import { toastSuccess } from '@/toast';
import DeletePhotosButton from './DeletePhotosButton'; import DeletePhotosButton from './DeletePhotosButton';
import { photoQuantityText } from '@/photo'; import { photoQuantityText } from '@/photo';
import { FaArrowDown, FaRegStar } from 'react-icons/fa6'; import { FaArrowDown, FaRegStar } from 'react-icons/fa6';
import ResponsiveText from '@/components/primitives/ResponsiveText';
export default function AdminBatchEditPanelClient({ export default function AdminBatchEditPanelClient({
uniqueTags, uniqueTags,
@ -49,8 +50,13 @@ export default function AdminBatchEditPanelClient({
); );
const renderPhotoCTA = () => selectedPhotoIds?.length === 0 const renderPhotoCTA = () => selectedPhotoIds?.length === 0
? <><FaArrowDown /> Select photos below</> ? <>
: <>{photosText} selected</>; <FaArrowDown />
Select photos below
</>
: <ResponsiveText shortText={photosText}>
{photosText} selected
</ResponsiveText>;
const renderActions = () => isInTagMode const renderActions = () => isInTagMode
? <> ? <>
@ -88,7 +94,9 @@ export default function AdminBatchEditPanelClient({
} }
primary primary
> >
Apply Tags <ResponsiveText shortText="Apply">
Apply Tags
</ResponsiveText>
</LoaderButton> </LoaderButton>
</> </>
: <> : <>
@ -122,7 +130,9 @@ export default function AdminBatchEditPanelClient({
onClick={() => setTags('')} onClick={() => setTags('')}
disabled={isPerformingSelectEdit} disabled={isPerformingSelectEdit}
> >
Tag ... <ResponsiveText shortText="Tag">
Tag ...
</ResponsiveText>
</LoaderButton> </LoaderButton>
</>} </>}
<LoaderButton <LoaderButton