-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(program-cta): RE-1948 add program CTA (#779)
- Loading branch information
Showing
6 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/components/ProfileCards/ProgramCTA/ProgramCTA.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ProgramCTA from '@/components/ProfileCards/ProgramCTA/ProgramCTA' | ||
import { StoryObj } from '@storybook/react' | ||
import { View } from 'tamagui' | ||
|
||
const meta = { | ||
title: 'Profile CTA/Program', | ||
component: () => ( | ||
<View width={400}> | ||
<ProgramCTA /> | ||
</View> | ||
), | ||
} | ||
|
||
type Story = StoryObj<typeof ProgramCTA> | ||
|
||
export const Default: Story = {} | ||
|
||
export default meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { useCallback } from 'react' | ||
import { Linking } from 'react-native' | ||
import { ProfileCallToActionLayout } from '@/components/ProfileCards/ProfileCallToActionLayout/ProfileCallToActionLayout' | ||
import { gray } from '../../../../theme/colors.hex' | ||
import Button from '../../Button' | ||
|
||
export default function ProgramCTA() { | ||
const onPress = useCallback(async () => { | ||
const link = 'https://besoindeurope.fr/projet?utm_source=app' | ||
if (await Linking.canOpenURL(link)) { | ||
await Linking.openURL(link) | ||
} | ||
}, []) | ||
|
||
return ( | ||
<ProfileCallToActionLayout noPadding> | ||
<ProfileCallToActionLayout.Content | ||
title="NOTRE PROGRAMME" | ||
titleStyle={{ | ||
fontWeight: 600, | ||
color: gray.gray6, | ||
}} | ||
content={'Nos 48 propositions en\ndétail sur notre site.'} | ||
contentStyle={{ | ||
lineHeight: 24, | ||
}} | ||
padding={'$3'} | ||
compact | ||
/> | ||
<ProfileCallToActionLayout.Actions> | ||
<Button variant={'outlined'} marginTop={'$2'} marginLeft={'$2.5'} zIndex={10} onPress={onPress}> | ||
<Button.Text>Voir Notre Projet</Button.Text> | ||
</Button> | ||
</ProfileCallToActionLayout.Actions> | ||
<ProfileCallToActionLayout.BackgroundImageBottomRight source={require('./assets/program.png')} bottom={-20} right={-16} height={170} /> | ||
</ProfileCallToActionLayout> | ||
) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.