Skip to content
This repository has been archived by the owner on May 20, 2019. It is now read-only.

feature request: support component as title value #13

Open
bdkent opened this issue Jul 18, 2017 · 2 comments
Open

feature request: support component as title value #13

bdkent opened this issue Jul 18, 2017 · 2 comments

Comments

@bdkent
Copy link

bdkent commented Jul 18, 2017

It would be nice if the step title could officially support arbitrary components rather than just strings, for instance to support simple icons (like font awesome) as part of the title.

For example:

title: (
    <span>
        <i class="fa fa-smile-o" />
        Hello
    </span>
)

It technically works now, but I get the warning:
Failed prop type: Invalid prop `title` of type `object` supplied to `Step`, expected `string`.

@claytn
Copy link
Collaborator

claytn commented Jul 19, 2017

I agree this would be a nice feature to have. I will look into it sometime within the next week or two and let you know what I come up with. I do have a feeling that styling the circles with the icons may be difficult. The icons will most likely have to be at a fixed size. I've tried in the past enlarging the font of the text inside the circle and the bars adjacent to the circles get off-centered very quickly.
In summary, adding icons may not be hard to do, but allowing styles to adjust according to the size of each icon may cause some issues.

@joakimleijon
Copy link

I'm also encountering this problem as I supply an entire button as title. It works perfectly, but I get the annoying proptype warning. I don't think you need to concern yourself with how the circle looks, as the title is shown below the circle and not inside it. From my point of view you can just enable object as proptype and it seems to work fine. Thanks for a great and easy to use package!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants