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

Created dialog component #140

Conversation

josephchimebuka
Copy link
Contributor

@josephchimebuka josephchimebuka commented May 31, 2024

I created a screen called Dialog in the screen directory to view my created dialog components.
To see the various dialog boxes,

  • click on the notification bell at the bottom of the screen which will show a button that says open dialog page then you will see various buttons for the different dialog boxes each

Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
joyboy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2024 9:43am
joyboy-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2024 9:43am

@ugur-eren
Copy link
Collaborator

ugur-eren commented May 31, 2024

Hi! It would be better to get the buttons from the props as described in the issue, instead of defining button1 and button2 hardcoded.

Dialog component should have a single prop buttons. {label: string; type: dangerous | primary | secondary; onPress: () => void}[]

Also we already have a component for button, we should use that instead of custom button for dialog.

@josephchimebuka
Copy link
Contributor Author

I have added a single button prop to the code

height={56}
x={0.5}
fill="#EC796B"
fillOpacity={0.1}
Copy link
Collaborator

Choose a reason for hiding this comment

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

colors should be currentColor, and the usage should include the color, not the definition. For example, this should be fill="currentColor" and usage would be <ExitIcon color="#EC796B" />

interface Button {
label: string;
type: 'dangerous' | 'primary' | 'secondary';
onPress: () => void;
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to create an interface for button

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The component is a Touchableopacity and not a button

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm addressing the interface Button it should be removed and moved into the props directly.

export type CustomModalProps = {
  name: string;
  buttons: {
    label: string;
    type: 'dangerous' | 'primary' | 'secondary';
    onPress: () => void;
  }[];
  icon: React.ReactNode;
  description: string;
  visible: boolean;
}

Copy link
Collaborator

@ugur-eren ugur-eren left a comment

Choose a reason for hiding this comment

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

Thanks for the work, just requested some minor changes.

@@ -107,6 +107,228 @@ export const UserIcon: React.FC<SvgProps> = (props) => (
</Svg>
);

export const CopyIcon: React.FC<SvgProps> = (props) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

CopyIcon has duplicate, there is already a CopyIcon in this file

/>
</Svg>
)
=======
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a git conflict marker left

Comment on lines 75 to 81
`;





const getTextColor = (type: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the formatting

@@ -14,3 +14,4 @@ export const Login: React.FC = () => {
</Auth>
);
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the formatting

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why change unrelated file?

);


export const Line: React.FC<SvgProps> = (props) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Icon names should end in Icon. LineIcon instead of Line

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the changes in this file

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please update your branch. These changes are related to old version of this file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Where does this image used?

Copy link
Collaborator

@ugur-eren ugur-eren left a comment

Choose a reason for hiding this comment

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

Hi, I've requested some changes. Please take a look at each one. And please make sure the app runs without errors before requesting a new review

@ugur-eren
Copy link
Collaborator

Closing in favour of #144

@ugur-eren ugur-eren closed this Jun 2, 2024
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.

Create Dialog component
2 participants