Skip to content

Commit

Permalink
fix: missing rethemed btns
Browse files Browse the repository at this point in the history
  • Loading branch information
OverGlass committed Sep 16, 2024
1 parent 779a15f commit 70ea92d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
9 changes: 4 additions & 5 deletions app/(dev)/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Button } from '@/components'
import { VoxButton } from '@/components/Button'
import { ArrowLeft } from '@tamagui/lucide-icons'
import { router, Stack } from 'expo-router'
import Storybook from '../../.storybook'

const HeaderLeft = () => (
<Button variant="text" onPress={() => router.replace('/(tabs)/(home)/')}>
<ArrowLeft size={16} color="$blue6" />
<Button.Text color="$blue6">Back</Button.Text>
</Button>
<VoxButton variant="text" onPress={() => router.replace('/(tabs)/(home)/')} iconLeft={ArrowLeft} theme="blue">
Back
</VoxButton>
)

export default () => (
Expand Down
14 changes: 7 additions & 7 deletions src/components/events/EventRegisterForm/EventRegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { ComponentProps, useId, useRef } from 'react'
import { Linking, LogBox } from 'react-native'
import Input from '@/components/base/Input/Input'
import Text from '@/components/base/Text'
import Button from '@/components/Button/Button'
import Button, { VoxButton } from '@/components/Button/Button'
import FormikController from '@/components/FormikController'
import VoxCard from '@/components/VoxCard/VoxCard'
import { useSession } from '@/ctx/SessionProvider'
import { PublicEventSubscriptionFormError } from '@/services/events/error'
import { useSubscribePublicEvent } from '@/services/events/hook'
import type { RestPostPublicEventSubsciptionRequest } from '@/services/events/schema'
import { CheckedState } from '@tamagui/checkbox-headless/src/useCheckbox'
import { Check as CheckIcon } from '@tamagui/lucide-icons'
import { CalendarCheck2, Check as CheckIcon } from '@tamagui/lucide-icons'
import { router } from 'expo-router'
import { Formik, FormikHelpers } from 'formik'
import { Checkbox, CheckboxProps, Dialog, H2, isWeb, Label, Paragraph, ScrollView, Spinner, useMedia, XStack, YStack } from 'tamagui'
Expand Down Expand Up @@ -163,6 +163,7 @@ const EventRegisterForm = (props: { onScrollTo?: (x: { x: number; y: number }) =
width="100%"
variant="text"
size="md"
theme="gray"
onPress={async () => {
const link = 'https://parti-renaissance.fr/politique-de-protection-des-donnees/'

Expand All @@ -178,12 +179,11 @@ const EventRegisterForm = (props: { onScrollTo?: (x: { x: number; y: number }) =
<DialogMentionLegale onPress={handlePress} />
</YStack>

<Button size="lg" width="100%" onPress={() => handleSubmit()}>
<Button.Text>S'inscrire</Button.Text>
{isSubmitting ? <Spinner color="$white1" /> : null}
</Button>
<VoxButton size="xl" width="100%" theme="blue" onPress={() => handleSubmit()} iconLeft={CalendarCheck2} loading={isSubmitting}>
M'inscrire
</VoxButton>

<Button variant="text" size="lg" width="100%" onPress={() => signIn()}>
<Button variant="text" theme="gray" size="lg" width="100%" onPress={() => signIn()}>
<Text fontSize="$1">
<Text color="$textPrimary" fontWeight="$7">
Me connecter
Expand Down
25 changes: 14 additions & 11 deletions src/components/events/detail/EventComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { memo } from 'react'
import { Keyboard, Platform } from 'react-native'
import { Button } from '@/components'
import { VoxButton } from '@/components/Button'
import EventRegisterForm from '@/components/events/EventRegisterForm/EventRegisterForm'
import InternAlert from '@/components/InternAlert/InternAlert'
import PageLayout from '@/components/layouts/PageLayout/PageLayout'
Expand All @@ -11,7 +12,7 @@ import useShareApi from '@/hooks/useShareApi'
import useCreateEvent from '@/modules/Calendar/Calendar'
import * as eventTypes from '@/services/events/schema'
import { ErrorMonitor } from '@/utils/ErrorMonitor'
import { Link as LinkIcon } from '@tamagui/lucide-icons'
import { CalendarCheck2, CalendarPlus, Link as LinkIcon, Share, Share2 } from '@tamagui/lucide-icons'
import { useToastController } from '@tamagui/toast'
import { isPast } from 'date-fns'
import { ScrollView, ScrollViewProps, Sheet, useMedia, XStack } from 'tamagui'
Expand Down Expand Up @@ -117,17 +118,17 @@ export function AsideShare({ data, id }: Readonly<{ data: eventTypes.RestEvent;
</Button>

{isShareAvailable && (
<Button variant="outlined" width="100%" size="lg" onPress={handleShareUrl}>
<Button.Text>Partager</Button.Text>
</Button>
<VoxButton variant="outlined" full size="lg" iconLeft={Share2} onPress={handleShareUrl}>
Partager
</VoxButton>
)}

{isFullEvent && (
<>
<VoxCard.Separator />
<Button variant="outlined" width="100%" size="lg" onPress={() => addToCalendar(createEventData(data))}>
<Button.Text>Ajouter à mon calendrier</Button.Text>
</Button>
<VoxButton variant="outlined" full size="lg" iconLeft={CalendarPlus} onPress={() => addToCalendar(createEventData(data))}>
Ajouter à mon calendrier
</VoxButton>
</>
)}
</VoxCard.Section>
Expand All @@ -147,16 +148,18 @@ function _RegisterButtonSheet(props: { id: string }) {

return (
<>
<Button
<VoxButton
variant="contained"
size="lg"
onPress={() => {
setOpen(true)
}}
width="100%"
theme="blue"
iconLeft={CalendarCheck2}
full
>
<Button.Text>M'inscrire</Button.Text>
</Button>
M'inscrire
</VoxButton>
<Sheet modal dismissOnSnapToBottom dismissOnOverlayPress moveOnKeyboardChange open={open} onOpenChange={handleOpenChange} snapPoints={[80]}>
<Sheet.Overlay />
<Sheet.Handle />
Expand Down

0 comments on commit 70ea92d

Please sign in to comment.