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

Possible to allow PropType "node" as well as string for backButtonText and nextButtonText? #72

Open
gtwilliams03 opened this issue Dec 11, 2017 · 3 comments

Comments

@gtwilliams03
Copy link

It would be nice to allow PropType node as well as a string to allow the insertion of icons, etc., into the button contents (backButtonText and nextButtonText):

nextButtonText={<span><FontAwesome name='chevron-right' /></span>}

Right now it throws an error if anything is included except a string:

Failed prop type: Invalid prop 'backButtonText' of type 'object' supplied to 'StepZilla', expected 'string'.
@zeel
Copy link
Collaborator

zeel commented Dec 17, 2017

@gtwilliams03 we can make validation of propTypes to be oneOfType([string, node]) in codebase.
cc @newbreedofgeek

@jermsam
Copy link

jermsam commented May 14, 2019

Was this ever implemented?

@zeel
Copy link
Collaborator

zeel commented Aug 12, 2019

If we do this change then we need to change prop name. It can't be backButtonText.

We can introduce new prop here backButtonNode and nextButtonNode. If these two are present then it will have more priority over text.

@jermsam @gtwilliams03 @newbreedofgeek any thoughts on this implementation? I can start with this approach.

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

No branches or pull requests

3 participants