-
Notifications
You must be signed in to change notification settings - Fork 51
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
Created dialog component #140
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 Also we already have a component for button, we should use that instead of custom button for dialog. |
I have added a single button prop to the code |
height={56} | ||
x={0.5} | ||
fill="#EC796B" | ||
fillOpacity={0.1} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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;
}
There was a problem hiding this 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.
JoyboyCommunity/src/assets/icons.tsx
Outdated
@@ -107,6 +107,228 @@ export const UserIcon: React.FC<SvgProps> = (props) => ( | |||
</Svg> | |||
); | |||
|
|||
export const CopyIcon: React.FC<SvgProps> = (props) => ( |
There was a problem hiding this comment.
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
JoyboyCommunity/src/assets/icons.tsx
Outdated
/> | ||
</Svg> | ||
) | ||
======= |
There was a problem hiding this comment.
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
`; | ||
|
||
|
||
|
||
|
||
|
||
const getTextColor = (type: string) => { |
There was a problem hiding this comment.
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> | |||
); | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change unrelated file?
JoyboyCommunity/src/assets/icons.tsx
Outdated
); | ||
|
||
|
||
export const Line: React.FC<SvgProps> = (props) => ( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
JoyboyCommunity/src/types/routes.ts
Outdated
There was a problem hiding this comment.
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.
JoyboyCommunity/assets/Logo.png
Outdated
There was a problem hiding this comment.
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?
There was a problem hiding this 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
Closing in favour of #144 |
I created a screen called Dialog in the screen directory to view my created dialog components.
To see the various dialog boxes,