Skip to content

Moved ColorPickerDialog to FC. #2823

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

Merged
merged 10 commits into from
Dec 5, 2023
Merged

Moved ColorPickerDialog to FC. #2823

merged 10 commits into from
Dec 5, 2023

Conversation

nitzanyiz
Copy link
Collaborator

Description

Changing the ColorPickerDialog to a FC.

Changelog

ColorPickerDialog - Changed to FC

@nitzanyiz nitzanyiz requested a review from ethanshar November 26, 2023 10:12
@nitzanyiz nitzanyiz marked this pull request as ready for review November 29, 2023 15:27
@nitzanyiz nitzanyiz changed the title Moving ColorPickerDialog to a FC. Moved ColorPickerDialog to FC. Nov 30, 2023
Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

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

Wrote a few more small comments

import {Colors} from '../../style';
import {ColorPickerDialogProps} from './ColorPickerDialog';
import {BORDER_RADIUS} from './ColorPickerPresenter';
type HeaderProps = Pick<ColorPickerDialogProps, 'doneButtonColor' | 'accessibilityLabels' | 'testID'> & {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add space between imports and global declarations

@@ -0,0 +1,108 @@
import React, {useRef} from 'react';
import {View, TouchableOpacity, Text} from 'react-native-ui-lib';
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can't/shouldn't import from uilib in a source code, you should import from the relevant components file directly
this can cause cyclic requires and TS build issues

Changed imports to import from relative path and not ui-lib
@nitzanyiz nitzanyiz requested a review from ethanshar December 4, 2023 15:07
@ethanshar ethanshar merged commit 0ca9770 into master Dec 5, 2023
@nitzanyiz nitzanyiz deleted the toFC/ColorPickerDialog branch December 5, 2023 12:12
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