Adding caretStyle to customize the caret#27
Adding caretStyle to customize the caret#27raquelmu wants to merge 2 commits intoeveningkid:mainfrom
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.
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.
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.
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.
| caretStyle?: ViewProps['style']; | |
| caretStyle?: PopoverProps['caretStyle']; |
| forceInitialAnimation = false, | ||
| numberOfLines, | ||
| visible = true, | ||
| caretStyle = null, |
There was a problem hiding this comment.
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.
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.