feat(admin-pwa): add floating action button to event form
This commit is contained in:
@@ -2,12 +2,12 @@ import React from 'react';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { CalendarDays, ChevronDown, MapPin } from 'lucide-react';
|
||||
import { CalendarDays, ChevronDown, MapPin, Save, Check } from 'lucide-react';
|
||||
import { YStack, XStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { Switch } from '@tamagui/switch';
|
||||
import { MobileShell } from './components/MobileShell';
|
||||
import { MobileCard, CTAButton } from './components/Primitives';
|
||||
import { MobileCard, CTAButton, FloatingActionButton } from './components/Primitives';
|
||||
import { MobileDateTimeInput, MobileField, MobileInput, MobileSelect, MobileTextArea } from './components/FormControls';
|
||||
import { LegalConsentSheet } from './components/LegalConsentSheet';
|
||||
import {
|
||||
@@ -559,7 +559,7 @@ export default function MobileEventFormPage() {
|
||||
</MobileField>
|
||||
</MobileCard>
|
||||
|
||||
<YStack space="$2">
|
||||
<YStack space="$2" paddingBottom="$10">
|
||||
{!isEdit ? (
|
||||
<CTAButton
|
||||
label={t('eventForm.actions.saveDraft', 'Save as draft')}
|
||||
@@ -567,18 +567,20 @@ export default function MobileEventFormPage() {
|
||||
onPress={back}
|
||||
/>
|
||||
) : null}
|
||||
<CTAButton
|
||||
label={
|
||||
saving
|
||||
? t('eventForm.actions.saving', 'Saving…')
|
||||
: isEdit
|
||||
? t('eventForm.actions.update', 'Update event')
|
||||
: t('eventForm.actions.create', 'Create event')
|
||||
}
|
||||
onPress={() => handleSubmit()}
|
||||
/>
|
||||
</YStack>
|
||||
|
||||
<FloatingActionButton
|
||||
label={
|
||||
saving
|
||||
? t('eventForm.actions.saving', 'Saving…')
|
||||
: isEdit
|
||||
? t('eventForm.actions.update', 'Update event')
|
||||
: t('eventForm.actions.create', 'Create event')
|
||||
}
|
||||
icon={isEdit ? Save : Check}
|
||||
onPress={() => handleSubmit()}
|
||||
/>
|
||||
|
||||
<LegalConsentSheet
|
||||
open={consentOpen}
|
||||
onClose={() => {
|
||||
|
||||
Reference in New Issue
Block a user