Skip to content
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

Merged
merged 5 commits into from
Mar 25, 2024
Merged

feat: adding custom buttons #172

merged 5 commits into from
Mar 25, 2024

Conversation

DominikDanielewicz
Copy link
Collaborator

@DominikDanielewicz DominikDanielewicz commented Mar 10, 2024

Changes:

  • Added customButton prop that allows to inject custom buttons into the EmojiPicker 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 #160
  • Added DeleteButton, a pre-designed component that can be used within the EmojiPicker as part of the customButton prop array.

Comment on lines 13 to 16
type CustomButtonType = {
customButtonPressHandler?: () => void
style?: DeleteButtonStyles
}
Copy link
Member

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?

Suggested change
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? 🤔

Copy link
Collaborator Author

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

src/contexts/KeyboardContext.ts Outdated Show resolved Hide resolved
src/contexts/KeyboardContext.ts Outdated Show resolved Hide resolved
@DominikDanielewicz DominikDanielewicz changed the title Adding custom button feature feat: adding custom buttons Mar 20, 2024
@danielmark0116 danielmark0116 merged commit b4ef98c into master Mar 25, 2024
3 checks passed
@loganwishartcraig
Copy link

Hey! This is mentioned in the docs, but isn't actually published yet, right? Just wanna make sure!

@DominikDanielewicz
Copy link
Collaborator Author

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!

@loganwishartcraig
Copy link

Awesome, thanks for the clarification. Best of luck with the release!

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.

None yet

3 participants