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/ Add custom content to Hint #1302

Merged
merged 2 commits into from
May 30, 2021
Merged

Feat/ Add custom content to Hint #1302

merged 2 commits into from
May 30, 2021

Conversation

lidord-wix
Copy link
Contributor

Description

Support passing custom content to the Hint component.
Related issue: #895

Changelog

Hint component now supports passing customContent prop.

@lidord-wix lidord-wix requested a review from ethanshar May 13, 2021 12:07
@ethanshar ethanshar requested review from M-i-k-e-l and removed request for ethanshar May 13, 2021 12:53
@ethanshar ethanshar assigned M-i-k-e-l and unassigned ethanshar May 13, 2021
@@ -435,8 +439,9 @@ class Hint extends Component<HintProps, HintState> {
style={[styles.hint, color && {backgroundColor: color}, !_.isUndefined(borderRadius) && {borderRadius}]}
ref={this.setHintRef}
>
{icon && <Image source={icon} style={[styles.icon, iconStyle]}/>}
<Text style={[styles.hintMessage, messageStyle]}>{message}</Text>
{customContent}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding a renderContent method?

demo/src/screens/componentScreens/HintsScreen.tsx Outdated Show resolved Hide resolved
@lidord-wix lidord-wix requested a review from M-i-k-e-l May 19, 2021 10:21
@M-i-k-e-l M-i-k-e-l merged commit 86a51b3 into master May 30, 2021
@lidord-wix lidord-wix deleted the feat/Hint_customContent branch May 31, 2021 08:50
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.

3 participants