-
Notifications
You must be signed in to change notification settings - Fork 734
ColorPicker style prop deprecation #2444
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
Conversation
src/components/colorPicker/index.tsx
Outdated
super(props); | ||
|
||
if (props.style) { | ||
LogService.warn('UILib ColorPicker style prop is deprecated.'); |
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.
LogService.warn('UILib ColorPicker style prop is deprecated.'); | |
LogService.warn('UILib ColorPicker style prop is deprecated. Please stop using it.'); |
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.
You should also tell the user what to do, otherwise, they will ask if there is another prop that replaces it etc.
src/components/colorPicker/index.tsx
Outdated
|
||
state = { | ||
show: false | ||
}; | ||
|
||
static defaultProps = { |
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.
We keep the statics up after the static displayName
{"name": "style", "type": "ViewStyle", "description": "Component's style"}, | ||
{"name": "testID", "type": "string", "description": "The test id for e2e tests"} | ||
{"name": "testID", "type": "string", "description": "The test id for e2e tests"}, | ||
{"name": "backgroundColor", "type": "string", "description": "Give the ColorPicker a background color"} |
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 change "Give the ColorPicker a background color" to "The ColorPicker's/Component's background color"
…ound prop description in the ColorPicker component
@@ -38,7 +38,8 @@ | |||
{"name": "containerWidth", "type": "number", "description": "The container margins"}, | |||
{"name": "containerStyle", "type": "ViewStyle", "description": "Component's container style"}, | |||
{"name": "style", "type": "ViewStyle", "description": "Component's style"}, | |||
{"name": "testID", "type": "string", "description": "The test id for e2e tests"} | |||
{"name": "testID", "type": "string", "description": "The test id for e2e tests"}, | |||
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette background color"} |
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.
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette background color"} | |
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette's background color"} |
@@ -54,7 +54,7 @@ interface Props { | |||
style?: StyleProp<ViewStyle>; | |||
testID?: string; | |||
/** | |||
* Give the ColorPalette a background color | |||
* Give the ColorPalette background color |
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.
* Give the ColorPalette background color | |
* The ColorPicker's background color |
src/components/colorPicker/index.tsx
Outdated
super(props); | ||
|
||
if (props.style) { | ||
LogService.warn(`UILib ColorPicker style prop is deprecated, please pass instead the 'backgroundColor' prop.`); |
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.
LogService.warn(`UILib ColorPicker style prop is deprecated, please pass instead the 'backgroundColor' prop.`); | |
LogService.warn(`UILib ColorPicker's 'style' prop is deprecated. You can use the 'backgroundColor' prop instead`); |
Description
ColorPicker style prop deprecation.
Changelog
ColorPicker style prop deprecation.