-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat: adding custom buttons #172
Conversation
src/components/DeleteButton.tsx
Outdated
type CustomButtonType = { | ||
customButtonPressHandler?: () => void | ||
style?: DeleteButtonStyles | ||
} |
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.
Since the button is a Pressable, what about just extending the PressableProps type, sth like this?
type CustomButtonType = { | |
customButtonPressHandler?: () => void | |
style?: DeleteButtonStyles | |
} | |
type CustomButtonType = { | |
containerStyle?: StyleProp<ViewStyle> | |
iconNormalColor?: string | |
iconActiveColor?: string | |
} & PressableProps |
If one decides to use this component, such implementation allows for passing other Pressable-specific props or simply just the testID etc? wdyt? 🤔
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.
Good point. I changed it like you said
Hey! This is mentioned in the docs, but isn't actually published yet, right? Just wanna make sure! |
Hi @loganwishartcraig, correct, that information is indeed documented, but it hasn't been officially released yet. We've identified a few more issues that we need to address before rolling out the next version. We appreciate your patience and are working to release it soon. Thanks for your understanding! |
Awesome, thanks for the clarification. Best of luck with the release! |
Changes:
customButton
prop that allows to inject custom buttons into theEmojiPicker
component, enabling additional functionalities or actions within the emoji picker interface. This flexible prop accepts an array of React elements, allowing for multiple custom buttons to be specified. It’s was a suggestion in Add an option to the keyboard to delete emojis #160DeleteButton
, a pre-designed component that can be used within theEmojiPicker
as part of the customButton prop array.