Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third Party Button Component #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

sivaShilpa
Copy link
Contributor

Done

  • Added svg files that are needed for the third party buttons and other components
  • Third Party Button Component is done along with the test file
  • Passes in props for the image source, the onChange function, width and height of the image as props to the component.

To Do

  • Write functional test code for this component.

@MelisaIm MelisaIm self-requested a review June 6, 2024 04:01

const ThirdPartyButton: React.FC<Props> = ({ imgSrc, handleClick, width, height }: Props) => {
return (
<TouchableOpacity onPress={handleClick} style={styles.buttonContainer}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sivaShilpa! :) Can you replace TouchableOpacity with Pressable? According to the docs it's a more future-proof way to handle the input: https://reactnative.dev/docs/touchableopacity

return (
<ThirdPartyButton
imgSrc="./assets/google-icon.svg"
handleClick={() => {}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a TODO comment for the work left pending 👍🏽 (creating a ticket and adding it to the comment would also be great that way we know what is left to do and we can scope it out during a meeting)

imgSrc="./assets/google-icon.svg"
handleClick={() => {}}
width={40}
height={40}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential enhancement for your button: Adding a "size" property of "S", "M" or "L" instead of hardcoding width and height so the buttons can be predictable sizes

Copy link
Member

@MelisaIm MelisaIm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sivaShilpa thank you for the great work! Please look at the suggestions and let me know what you think

@MelisaIm MelisaIm mentioned this pull request Jun 8, 2024
@MelisaIm
Copy link
Member

@sivaShilpa is this PR ready for review again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants