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

[FR] Provide hashkeys or another prop specified on child as array to Nav component #39

Open
akshitkrnagpal opened this issue Aug 13, 2019 · 0 comments

Comments

@akshitkrnagpal
Copy link

akshitkrnagpal commented Aug 13, 2019

My use case is that I want to display a title for each step in the navbar.
My current solution is to create a new array and render navbar items by mapping it.
It would be nice if Nav component can get just the hashkeys of all children rendered in StepWizard component. It can also be some other prop if not hashKeys.

Something like this would be helpful in my case.

<StepWizard nav={<Nav />}>
   <StepA hashKey='A' />
   <StepB hashKey='B' />
   <StepC hashKey='C' />
</StepWizard>
const Nav = ({ hashKeys }) => {
   console.log(hashKeys);
   //  => ['A', 'B', 'C']
}

It would be great if, I can just map an array prop to display my navbar items.

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

No branches or pull requests

2 participants