-
Notifications
You must be signed in to change notification settings - Fork 29
Adding caretStyle to customize the caret #27
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
base: main
Are you sure you want to change the base?
Conversation
|
I just saw there was another PR with similar work: |
|
@eveningkid This PR would help with my project, I'm sure other people will benefit from this as well |
eveningkid
left a comment
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 @raquelmu and @williangaspar!
I completely missed the notifications and I'm really sorry for the wait!
This is a great initiative, just reviewed your changes to keep everything consistent :)
Feel free to ask any question if you're blocked on one of the suggested changes
Thank you so much for contributing to the project!
| {...sharedPopoverProps} | ||
| forceInitialAnimation | ||
| caretStyle={caretStyle} |
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.
Could caretStyle be added to sharedPopoverProps instead?
const sharedPopoverProps = {
animated,
...,
caretPosition,
caretStyle, // <<If we don't, caretStyle won't be added to the other instance of Popover on web below :)
| - [style](#style) | ||
| - [visible (from Popover)](#visible) | ||
| - [wrapperStyle](#wrapperStyle) | ||
| - [caretStyle](#caretStyle) |
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.
Could this be added alongside caret* props?
Below caretPosition for example!
Please make sure to also change the position of the caretStyle paragraph :)
| style?: PopoverProps['style']; | ||
| visible?: boolean; | ||
| wrapperStyle?: ViewProps['style']; | ||
| caretStyle?: ViewProps['style']; |
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.
| caretStyle?: ViewProps['style']; | |
| caretStyle?: PopoverProps['caretStyle']; |
| forceInitialAnimation = false, | ||
| numberOfLines, | ||
| visible = true, | ||
| caretStyle = null, |
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 set a default value, undefined will work too:
| caretStyle = null, | |
| caretStyle, |
| forceInitialAnimation?: boolean; | ||
| numberOfLines?: number; | ||
| visible?: boolean; | ||
| caretStyle: ViewProps['style']; |
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.
caretStyle should be optional :)
| caretStyle: ViewProps['style']; | |
| caretStyle?: ViewProps['style']; |
|
Guys, any news? |
|
For people who wants to use the change now you can edit your dependencies and list the PR as a dependency. "react-native-popable": "eveningkid/react-native-popable#pull/27/head",caretStyle={{ backgroundColor: 'red', left: -90 }} |
|
i have no doubt that this would be useful for everyone! an interesting point is that, using yarn, i had to reference the pr as follows: "react-native-popable": "eveningkid/react-native-popable#27/head", |
Added caretStyle property to the component to allow more customization.