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

adding badgeStyle props #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

adding badgeStyle props #71

wants to merge 2 commits into from

Conversation

cyril36
Copy link

@cyril36 cyril36 commented Mar 13, 2024

Hello,

I have added a badgeStyle props as commented in the issue #67

I wanted to include all the badgeProps in this props as in the example :
badgeProps={mybadgeProps}

but i dont know what kind of interface type i should use :

export interface TabScreenProps {
   label: string;
   icon?: IconSource;
   badge?: string | number | boolean;
   badgeProps?: ???;
   children: any;
   onPress?: (event: GestureResponderEvent) => void;
   onPressIn?: (event: GestureResponderEvent) => void;

I dont know much Typescript so if you want me to add more props and not just the style i can do a new PR later but i would appreciate if you can indicate me the type of the props i should put.

Meanwhile i hope this PR will be useful and thank you for this nice library ;)

@cyril36
Copy link
Author

cyril36 commented Mar 13, 2024

After taking a break the obvious come to my mind and knew how to create this badgeProps and felt stupid about asking :D

I have updated the badgeStyle to badgeProps without including children as you already do it with the badge prop.
I also kept your default value if the size is not mentioned in the badgeProps.
I have also updated the readme with how to use the badgeProps prop
Let me know if any update is needed

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.

1 participant